Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
VSTEffectOptionsDialog Class Referencefinal

#include <VSTEffectOptionsDialog.h>

Inheritance diagram for VSTEffectOptionsDialog:
[legend]
Collaboration diagram for VSTEffectOptionsDialog:
[legend]

Public Member Functions

 VSTEffectOptionsDialog (const EffectDefinitionInterface &effect)
 
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

const EffectDefinitionInterfacemEffect
 
int mBufferSize
 
bool mUseLatency
 
bool mUseGUI
 

Detailed Description

Dialog for configuring latency, buffer size and graphics mode for a VST effect.

Definition at line 22 of file VSTEffectOptionsDialog.h.

Constructor & Destructor Documentation

◆ VSTEffectOptionsDialog()

VSTEffectOptionsDialog::VSTEffectOptionsDialog ( const EffectDefinitionInterface effect)
explicit

Definition at line 25 of file VSTEffectOptionsDialog.cpp.

27 : wxDialogWrapper{ nullptr, wxID_ANY, XO("VST Effect Options") }
28 , mEffect{ effect }
29{
31 wxT("BufferSize"), mBufferSize, 8192);
33 wxT("UseLatency"), mUseLatency, true);
35 wxT("UseGUI"), mUseGUI, true);
36
39}
wxT("CloseDown"))
XO("Cut/Copy/Paste")
@ eIsCreating
Definition: ShuttleGui.h:37
#define S(N)
Definition: ToChars.cpp:64
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
const EffectDefinitionInterface & mEffect
void PopulateOrExchange(ShuttleGui &S)
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)

References XO().

Here is the call graph for this function:

◆ ~VSTEffectOptionsDialog()

VSTEffectOptionsDialog::~VSTEffectOptionsDialog ( )
virtual

Definition at line 41 of file VSTEffectOptionsDialog.cpp.

42{
43}

Member Function Documentation

◆ OnOk()

void VSTEffectOptionsDialog::OnOk ( wxCommandEvent &  evt)

Definition at line 118 of file VSTEffectOptionsDialog.cpp.

119{
120 if (!Validate())
121 {
122 return;
123 }
124
127
129 wxT("BufferSize"), mBufferSize);
131 wxT("UseLatency"), mUseLatency);
133 wxT("UseGUI"), mUseGUI);
134
135 EndModal(wxID_OK);
136}
@ eIsGettingFromDialog
Definition: ShuttleGui.h:38
bool SetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &value)

References eIsGettingFromDialog, mBufferSize, mEffect, mUseGUI, mUseLatency, PopulateOrExchange(), S, PluginSettings::SetConfig(), PluginSettings::Shared, and wxT().

Here is the call graph for this function:

◆ PopulateOrExchange()

void VSTEffectOptionsDialog::PopulateOrExchange ( ShuttleGui S)

Definition at line 45 of file VSTEffectOptionsDialog.cpp.

46{
47 S.SetBorder(5);
48 S.StartHorizontalLay(wxEXPAND, 1);
49 {
50 S.StartVerticalLay(false);
51 {
52 S.StartStatic(XO("Buffer Size"));
53 {
54 S.AddVariableText( XO(
55"The buffer size controls the number of samples sent to the effect "
56"on each iteration. Smaller values will cause slower processing and "
57"some effects require 8192 samples or less to work properly. However "
58"most effects can accept large buffers and using them will greatly "
59"reduce processing time."),
60 false, 0, 650);
61
62 S.StartHorizontalLay(wxALIGN_LEFT);
63 {
64 wxTextCtrl *t;
65 t = S.Validator<IntegerValidator<int>>(
66 &mBufferSize, NumValidatorStyle::DEFAULT, 8, 1048576 * 1)
67 .MinSize( { 100, -1 } )
68 .TieNumericTextBox(XXO("&Buffer Size (8 to 1048576 samples):"),
70 12);
71 }
72 S.EndHorizontalLay();
73 }
74 S.EndStatic();
75
76 S.StartStatic(XO("Latency Compensation"));
77 {
78 S.AddVariableText( XO(
79"As part of their processing, some VST effects must delay returning "
80"audio to Audacity. When not compensating for this delay, you will "
81"notice that small silences have been inserted into the audio. "
82"Enabling this option will provide that compensation, but it may "
83"not work for all VST effects."),
84 false, 0, 650);
85
86 S.StartHorizontalLay(wxALIGN_LEFT);
87 {
88 S.TieCheckBox(XXO("Enable &compensation"),
90 }
91 S.EndHorizontalLay();
92 }
93 S.EndStatic();
94
95 S.StartStatic(XO("Graphical Mode"));
96 {
97 S.AddVariableText( XO(
98"Most VST effects have a graphical interface for setting parameter values."
99" A basic text-only method is also available. "
100" Reopen the effect for this to take effect."),
101 false, 0, 650);
102 S.TieCheckBox(XXO("Enable &graphical interface"),
103 mUseGUI);
104 }
105 S.EndStatic();
106 }
107 S.EndVerticalLay();
108 }
109 S.EndHorizontalLay();
110
111 S.AddStandardButtons();
112
113 Layout();
114 Fit();
115 Center();
116}
XXO("&Cut/Copy/Paste Toolbar")

References mBufferSize, mUseGUI, mUseLatency, S, 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 34 of file VSTEffectOptionsDialog.h.

Referenced by OnOk(), and PopulateOrExchange().

◆ mEffect

const EffectDefinitionInterface& VSTEffectOptionsDialog::mEffect
private

Definition at line 33 of file VSTEffectOptionsDialog.h.

Referenced by OnOk().

◆ mUseGUI

bool VSTEffectOptionsDialog::mUseGUI
private

Definition at line 36 of file VSTEffectOptionsDialog.h.

Referenced by OnOk(), and PopulateOrExchange().

◆ mUseLatency

bool VSTEffectOptionsDialog::mUseLatency
private

Definition at line 35 of file VSTEffectOptionsDialog.h.

Referenced by OnOk(), and PopulateOrExchange().


The documentation for this class was generated from the following files: