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

#include <VST3OptionsDialog.h>

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

Public Member Functions

 VST3OptionsDialog (wxWindow *parent, EffectDefinitionInterface &effect)
 
virtual ~VST3OptionsDialog ()
 
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

EffectDefinitionInterfacemEffect
 
int mBufferSize
 
bool mUseGUI
 
bool mUseLatency
 

Detailed Description

Definition at line 18 of file VST3OptionsDialog.h.

Constructor & Destructor Documentation

◆ VST3OptionsDialog()

VST3OptionsDialog::VST3OptionsDialog ( wxWindow *  parent,
EffectDefinitionInterface effect 
)

Definition at line 22 of file VST3OptionsDialog.cpp.

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

◆ ~VST3OptionsDialog()

VST3OptionsDialog::~VST3OptionsDialog ( )
virtual

Definition at line 38 of file VST3OptionsDialog.cpp.

39{
40}

Member Function Documentation

◆ OnOk()

void VST3OptionsDialog::OnOk ( wxCommandEvent &  evt)

Definition at line 115 of file VST3OptionsDialog.cpp.

116{
117 if (!Validate())
118 {
119 return;
120 }
121
124
126 wxT("BufferSize"), mBufferSize);
128 wxT("UseLatency"), mUseLatency);
130 wxT("UseGUI"), mUseGUI);
131
132 EndModal(wxID_OK);
133}
@ eIsGettingFromDialog
Definition: ShuttleGui.h:40
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 VST3OptionsDialog::PopulateOrExchange ( ShuttleGui S)

Definition at line 42 of file VST3OptionsDialog.cpp.

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

Definition at line 30 of file VST3OptionsDialog.h.

Referenced by OnOk(), and PopulateOrExchange().

◆ mEffect

EffectDefinitionInterface& VST3OptionsDialog::mEffect
private

Definition at line 29 of file VST3OptionsDialog.h.

Referenced by OnOk().

◆ mUseGUI

bool VST3OptionsDialog::mUseGUI
private

Definition at line 31 of file VST3OptionsDialog.h.

Referenced by OnOk(), and PopulateOrExchange().

◆ mUseLatency

bool VST3OptionsDialog::mUseLatency
private

Definition at line 32 of file VST3OptionsDialog.h.

Referenced by OnOk(), and PopulateOrExchange().


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