Audacity  3.0.3
Public Member Functions | Private Attributes | List of all members
VSTEffectOptionsDialog Class Referencefinal
Inheritance diagram for VSTEffectOptionsDialog:
[legend]
Collaboration diagram for VSTEffectOptionsDialog:
[legend]

Public Member Functions

 VSTEffectOptionsDialog (wxWindow *parent, EffectHostInterface *host)
 
virtual ~VSTEffectOptionsDialog ()
 
void PopulateOrExchange (ShuttleGui &S)
 
void OnOk (wxCommandEvent &evt)
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Attributes

EffectHostInterfacemHost
 
int mBufferSize
 
bool mUseLatency
 
bool mUseGUI
 

Detailed Description

Definition at line 756 of file VSTEffect.cpp.

Constructor & Destructor Documentation

◆ VSTEffectOptionsDialog()

VSTEffectOptionsDialog::VSTEffectOptionsDialog ( wxWindow *  parent,
EffectHostInterface host 
)

Definition at line 779 of file VSTEffect.cpp.

780 : wxDialogWrapper(parent, wxID_ANY, XO("VST Effect Options"))
781 {
782  mHost = host;
783 
784  mHost->GetSharedConfig(wxT("Options"), wxT("BufferSize"), mBufferSize, 8192);
785  mHost->GetSharedConfig(wxT("Options"), wxT("UseLatency"), mUseLatency, true);
786  mHost->GetSharedConfig(wxT("Options"), wxT("UseGUI"), mUseGUI, true);
787 
788  ShuttleGui S(this, eIsCreating);
790 }

References eIsCreating.

◆ ~VSTEffectOptionsDialog()

VSTEffectOptionsDialog::~VSTEffectOptionsDialog ( )
virtual

Definition at line 792 of file VSTEffect.cpp.

793 {
794 }

Member Function Documentation

◆ OnOk()

void VSTEffectOptionsDialog::OnOk ( wxCommandEvent &  evt)

Definition at line 869 of file VSTEffect.cpp.

870 {
871  if (!Validate())
872  {
873  return;
874  }
875 
878 
879  mHost->SetSharedConfig(wxT("Options"), wxT("BufferSize"), mBufferSize);
880  mHost->SetSharedConfig(wxT("Options"), wxT("UseLatency"), mUseLatency);
881  mHost->SetSharedConfig(wxT("Options"), wxT("UseGUI"), mUseGUI);
882 
883  EndModal(wxID_OK);
884 }

References eIsGettingFromDialog, mBufferSize, mHost, mUseGUI, mUseLatency, PopulateOrExchange(), and ConfigClientInterface::SetSharedConfig().

Here is the call graph for this function:

◆ PopulateOrExchange()

void VSTEffectOptionsDialog::PopulateOrExchange ( ShuttleGui S)

Definition at line 796 of file VSTEffect.cpp.

797 {
798  S.SetBorder(5);
799  S.StartHorizontalLay(wxEXPAND, 1);
800  {
801  S.StartVerticalLay(false);
802  {
803  S.StartStatic(XO("Buffer Size"));
804  {
805  S.AddVariableText( XO(
806 "The buffer size controls the number of samples sent to the effect "
807 "on each iteration. Smaller values will cause slower processing and "
808 "some effects require 8192 samples or less to work properly. However "
809 "most effects can accept large buffers and using them will greatly "
810 "reduce processing time."),
811  false, 0, 650);
812 
813  S.StartHorizontalLay(wxALIGN_LEFT);
814  {
815  wxTextCtrl *t;
816  t = S.Validator<IntegerValidator<int>>(
817  &mBufferSize, NumValidatorStyle::DEFAULT, 8, 1048576 * 1)
818  .MinSize( { 100, -1 } )
819  .TieNumericTextBox(XXO("&Buffer Size (8 to 1048576 samples):"),
820  mBufferSize,
821  12);
822  }
823  S.EndHorizontalLay();
824  }
825  S.EndStatic();
826 
827  S.StartStatic(XO("Latency Compensation"));
828  {
829  S.AddVariableText( XO(
830 "As part of their processing, some VST effects must delay returning "
831 "audio to Audacity. When not compensating for this delay, you will "
832 "notice that small silences have been inserted into the audio. "
833 "Enabling this option will provide that compensation, but it may "
834 "not work for all VST effects."),
835  false, 0, 650);
836 
837  S.StartHorizontalLay(wxALIGN_LEFT);
838  {
839  S.TieCheckBox(XXO("Enable &compensation"),
840  mUseLatency);
841  }
842  S.EndHorizontalLay();
843  }
844  S.EndStatic();
845 
846  S.StartStatic(XO("Graphical Mode"));
847  {
848  S.AddVariableText( XO(
849 "Most VST effects have a graphical interface for setting parameter values."
850 " A basic text-only method is also available. "
851 " Reopen the effect for this to take effect."),
852  false, 0, 650);
853  S.TieCheckBox(XXO("Enable &graphical interface"),
854  mUseGUI);
855  }
856  S.EndStatic();
857  }
858  S.EndVerticalLay();
859  }
860  S.EndHorizontalLay();
861 
862  S.AddStandardButtons();
863 
864  Layout();
865  Fit();
866  Center();
867 }

References ShuttleGui::AddStandardButtons(), ShuttleGuiBase::AddVariableText(), ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndStatic(), ShuttleGuiBase::EndVerticalLay(), mBufferSize, mUseGUI, mUseLatency, ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::StartVerticalLay(), ShuttleGuiBase::TieCheckBox(), ShuttleGui::Validator(), XO, and XXO.

Referenced by OnOk().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mBufferSize

int VSTEffectOptionsDialog::mBufferSize
private

Definition at line 768 of file VSTEffect.cpp.

Referenced by OnOk(), and PopulateOrExchange().

◆ mHost

EffectHostInterface* VSTEffectOptionsDialog::mHost
private

Definition at line 767 of file VSTEffect.cpp.

Referenced by OnOk().

◆ mUseGUI

bool VSTEffectOptionsDialog::mUseGUI
private

Definition at line 770 of file VSTEffect.cpp.

Referenced by OnOk(), and PopulateOrExchange().

◆ mUseLatency

bool VSTEffectOptionsDialog::mUseLatency
private

Definition at line 769 of file VSTEffect.cpp.

Referenced by OnOk(), and PopulateOrExchange().


The documentation for this class was generated from the following file:
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1184
eIsGettingFromDialog
@ eIsGettingFromDialog
Definition: ShuttleGui.h:39
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1629
XO
#define XO(s)
Definition: Internat.h:31
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1177
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1167
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1203
VSTEffectOptionsDialog::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S)
Definition: VSTEffect.cpp:796
ShuttleGui::Validator
ShuttleGui & Validator(const Factory &f)
Definition: ShuttleGui.h:678
ConfigClientInterface::GetSharedConfig
virtual bool GetSharedConfig(const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval)=0
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:893
VSTEffectOptionsDialog::mBufferSize
int mBufferSize
Definition: VSTEffect.cpp:768
ConfigClientInterface::SetSharedConfig
virtual bool SetSharedConfig(const RegistryPath &group, const RegistryPath &key, const wxString &value)=0
wxDialogWrapper::wxDialogWrapper
wxDialogWrapper()
Definition: wxPanelWrapper.h:84
ShuttleGui::AddStandardButtons
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
Definition: ShuttleGui.cpp:2444
VSTEffectOptionsDialog::mUseGUI
bool mUseGUI
Definition: VSTEffect.cpp:770
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:489
VSTEffectOptionsDialog::mHost
EffectHostInterface * mHost
Definition: VSTEffect.cpp:767
ShuttleGuiBase::AddVariableText
wxStaticText * AddVariableText(const TranslatableString &Str, bool bCenter=false, int PositionFlags=0, int wrapWidth=0)
Definition: ShuttleGui.cpp:463
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
VSTEffectOptionsDialog::mUseLatency
bool mUseLatency
Definition: VSTEffect.cpp:769
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631