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 (const 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

const EffectDefinitionInterfacemEffect
 
int mBufferSize
 
bool mUseGUI
 
bool mUseLatency
 

Detailed Description

Definition at line 18 of file VST3OptionsDialog.h.

Constructor & Destructor Documentation

◆ VST3OptionsDialog()

VST3OptionsDialog::VST3OptionsDialog ( const EffectDefinitionInterface effect)
explicit

Definition at line 22 of file VST3OptionsDialog.cpp.

23 : wxDialogWrapper{ nullptr, wxID_ANY, XO("VST Effect Options") }
24 , mEffect{ effect }
25{
27 wxT("BufferSize"), mBufferSize, 8192);
29 wxT("UseLatency"), mUseLatency, true);
31 wxT("UseGUI"), mUseGUI, true);
32
35}
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:

◆ ~VST3OptionsDialog()

VST3OptionsDialog::~VST3OptionsDialog ( )
virtual

Definition at line 37 of file VST3OptionsDialog.cpp.

38{
39}

Member Function Documentation

◆ OnOk()

void VST3OptionsDialog::OnOk ( wxCommandEvent &  evt)

Definition at line 114 of file VST3OptionsDialog.cpp.

115{
116 if (!Validate())
117 {
118 return;
119 }
120
123
125 wxT("BufferSize"), mBufferSize);
127 wxT("UseLatency"), mUseLatency);
129 wxT("UseGUI"), mUseGUI);
130
131 EndModal(wxID_OK);
132}
@ 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 VST3OptionsDialog::PopulateOrExchange ( ShuttleGui S)

Definition at line 41 of file VST3OptionsDialog.cpp.

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

const 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: