Audacity 3.2.0
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, 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

EffectDefinitionInterfacemEffect
 
int mBufferSize
 
bool mUseLatency
 
bool mUseGUI
 

Detailed Description

Definition at line 417 of file VSTEffect.cpp.

Constructor & Destructor Documentation

◆ VSTEffectOptionsDialog()

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

Definition at line 440 of file VSTEffect.cpp.

442: wxDialogWrapper(parent, wxID_ANY, XO("VST Effect Options"))
443, mEffect{ effect }
444{
446 wxT("BufferSize"), mBufferSize, 8192);
448 wxT("UseLatency"), mUseLatency, true);
450 wxT("UseGUI"), mUseGUI, true);
451
452 ShuttleGui S(this, eIsCreating);
454}
#define XO(s)
Definition: Internat.h:31
@ 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
Definition: VSTEffect.cpp:428
void PopulateOrExchange(ShuttleGui &S)
Definition: VSTEffect.cpp:460
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)

◆ ~VSTEffectOptionsDialog()

VSTEffectOptionsDialog::~VSTEffectOptionsDialog ( )
virtual

Definition at line 456 of file VSTEffect.cpp.

457{
458}

Member Function Documentation

◆ OnOk()

void VSTEffectOptionsDialog::OnOk ( wxCommandEvent &  evt)

Definition at line 533 of file VSTEffect.cpp.

534{
535 if (!Validate())
536 {
537 return;
538 }
539
542
544 wxT("BufferSize"), mBufferSize);
546 wxT("UseLatency"), mUseLatency);
548 wxT("UseGUI"), mUseGUI);
549
550 EndModal(wxID_OK);
551}
@ 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(), and PluginSettings::Shared.

Here is the call graph for this function:

◆ PopulateOrExchange()

void VSTEffectOptionsDialog::PopulateOrExchange ( ShuttleGui S)

Definition at line 460 of file VSTEffect.cpp.

461{
462 S.SetBorder(5);
463 S.StartHorizontalLay(wxEXPAND, 1);
464 {
465 S.StartVerticalLay(false);
466 {
467 S.StartStatic(XO("Buffer Size"));
468 {
469 S.AddVariableText( XO(
470"The buffer size controls the number of samples sent to the effect "
471"on each iteration. Smaller values will cause slower processing and "
472"some effects require 8192 samples or less to work properly. However "
473"most effects can accept large buffers and using them will greatly "
474"reduce processing time."),
475 false, 0, 650);
476
477 S.StartHorizontalLay(wxALIGN_LEFT);
478 {
479 wxTextCtrl *t;
480 t = S.Validator<IntegerValidator<int>>(
481 &mBufferSize, NumValidatorStyle::DEFAULT, 8, 1048576 * 1)
482 .MinSize( { 100, -1 } )
483 .TieNumericTextBox(XXO("&Buffer Size (8 to 1048576 samples):"),
485 12);
486 }
487 S.EndHorizontalLay();
488 }
489 S.EndStatic();
490
491 S.StartStatic(XO("Latency Compensation"));
492 {
493 S.AddVariableText( XO(
494"As part of their processing, some VST effects must delay returning "
495"audio to Audacity. When not compensating for this delay, you will "
496"notice that small silences have been inserted into the audio. "
497"Enabling this option will provide that compensation, but it may "
498"not work for all VST effects."),
499 false, 0, 650);
500
501 S.StartHorizontalLay(wxALIGN_LEFT);
502 {
503 S.TieCheckBox(XXO("Enable &compensation"),
505 }
506 S.EndHorizontalLay();
507 }
508 S.EndStatic();
509
510 S.StartStatic(XO("Graphical Mode"));
511 {
512 S.AddVariableText( XO(
513"Most VST effects have a graphical interface for setting parameter values."
514" A basic text-only method is also available. "
515" Reopen the effect for this to take effect."),
516 false, 0, 650);
517 S.TieCheckBox(XXO("Enable &graphical interface"),
518 mUseGUI);
519 }
520 S.EndStatic();
521 }
522 S.EndVerticalLay();
523 }
524 S.EndHorizontalLay();
525
526 S.AddStandardButtons();
527
528 Layout();
529 Fit();
530 Center();
531}
#define XXO(s)
Definition: Internat.h:44

References mBufferSize, mUseGUI, mUseLatency, S, XO, and XXO.

Referenced by OnOk().

Here is the caller graph for this function:

Member Data Documentation

◆ mBufferSize

int VSTEffectOptionsDialog::mBufferSize
private

Definition at line 429 of file VSTEffect.cpp.

Referenced by OnOk(), and PopulateOrExchange().

◆ mEffect

EffectDefinitionInterface& VSTEffectOptionsDialog::mEffect
private

Definition at line 428 of file VSTEffect.cpp.

Referenced by OnOk().

◆ mUseGUI

bool VSTEffectOptionsDialog::mUseGUI
private

Definition at line 431 of file VSTEffect.cpp.

Referenced by OnOk(), and PopulateOrExchange().

◆ mUseLatency

bool VSTEffectOptionsDialog::mUseLatency
private

Definition at line 430 of file VSTEffect.cpp.

Referenced by OnOk(), and PopulateOrExchange().


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