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 422 of file VSTEffect.cpp.

Constructor & Destructor Documentation

◆ VSTEffectOptionsDialog()

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

Definition at line 445 of file VSTEffect.cpp.

447: wxDialogWrapper(parent, wxID_ANY, XO("VST Effect Options"))
448, mEffect{ effect }
449{
451 wxT("BufferSize"), mBufferSize, 8192);
453 wxT("UseLatency"), mUseLatency, true);
455 wxT("UseGUI"), mUseGUI, true);
456
457 ShuttleGui S(this, eIsCreating);
459}
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
Definition: VSTEffect.cpp:433
void PopulateOrExchange(ShuttleGui &S)
Definition: VSTEffect.cpp:465
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 461 of file VSTEffect.cpp.

462{
463}

Member Function Documentation

◆ OnOk()

void VSTEffectOptionsDialog::OnOk ( wxCommandEvent &  evt)

Definition at line 538 of file VSTEffect.cpp.

539{
540 if (!Validate())
541 {
542 return;
543 }
544
547
549 wxT("BufferSize"), mBufferSize);
551 wxT("UseLatency"), mUseLatency);
553 wxT("UseGUI"), mUseGUI);
554
555 EndModal(wxID_OK);
556}
@ 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 VSTEffectOptionsDialog::PopulateOrExchange ( ShuttleGui S)

Definition at line 465 of file VSTEffect.cpp.

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

Referenced by OnOk(), and PopulateOrExchange().

◆ mEffect

EffectDefinitionInterface& VSTEffectOptionsDialog::mEffect
private

Definition at line 433 of file VSTEffect.cpp.

Referenced by OnOk().

◆ mUseGUI

bool VSTEffectOptionsDialog::mUseGUI
private

Definition at line 436 of file VSTEffect.cpp.

Referenced by OnOk(), and PopulateOrExchange().

◆ mUseLatency

bool VSTEffectOptionsDialog::mUseLatency
private

Definition at line 435 of file VSTEffect.cpp.

Referenced by OnOk(), and PopulateOrExchange().


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