Audacity  3.0.3
VSTEffect.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  VSTEffect.h
6 
7  Dominic Mazzoni
8 
9 **********************************************************************/
10 
11 
12 
13 #if USE_VST
14 
15 #include "EffectInterface.h"
16 #include "ModuleInterface.h"
17 #include "PluginInterface.h"
18 
19 #include "SampleFormat.h"
20 #include "XMLTagHandler.h"
21 
22 class wxSizerItem;
23 class wxSlider;
24 class wxStaticText;
25 
26 class NumericTextCtrl;
27 
28 class VSTControl;
29 #include "VSTControl.h"
30 
31 #define VSTCMDKEY wxT("-checkvst")
32 /* i18n-hint: Abbreviates Virtual Studio Technology, an audio software protocol
33  developed by Steinberg GmbH */
34 #define VSTPLUGINTYPE XO("VST")
35 
36 #define audacityVSTID CCONST('a', 'u', 'D', 'y');
37 
38 typedef intptr_t (*dispatcherFn)(AEffect * effect,
39  int opCode,
40  int index,
41  intptr_t value,
42  void *ptr,
43  float opt);
44 
45 typedef void (*processFn)(AEffect * effect,
46  float **inputs,
47  float **outputs,
48  int sampleframes);
49 
50 typedef void (*setParameterFn)(AEffect * effect,
51  int index,
52  float parameter);
53 
54 typedef float (*getParameterFn)(AEffect * effect,
55  int index);
56 
57 typedef AEffect *(*vstPluginMain)(audioMasterCallback audioMaster);
58 
59 class VSTEffectTimer;
60 class VSTEffectDialog;
61 class VSTEffect;
62 class wxDynamicLibrary;
63 
64 #if defined(__WXMAC__)
65 struct __CFBundle;
66 typedef struct __CFBundle *CFBundleRef;
67 #if __LP64__
68 typedef int CFBundleRefNum;
69 #else
70 typedef signed short SInt16;
71 typedef SInt16 CFBundleRefNum;
72 #endif
73 #endif
74 
76 //
77 // VSTEffect
78 //
80 
81 using VSTEffectArray = std::vector < std::unique_ptr<VSTEffect> > ;
82 
83 DECLARE_LOCAL_EVENT_TYPE(EVT_SIZEWINDOW, -1);
84 DECLARE_LOCAL_EVENT_TYPE(EVT_UPDATEDISPLAY, -1);
85 
92 class VSTEffect final : public wxEvtHandler,
93  public EffectClientInterface,
95  public XMLTagHandler,
96  public VSTEffectLink
97 {
98  public:
99  VSTEffect(const PluginPath & path, VSTEffect *master = NULL);
100  virtual ~VSTEffect();
101 
102  // ComponentInterface implementation
103 
104  PluginPath GetPath() override;
106  VendorSymbol GetVendor() override;
107  wxString GetVersion() override;
109 
110  // EffectDefinitionInterface implementation
111 
112  EffectType GetType() override;
113  EffectFamilySymbol GetFamily() override;
114  bool IsInteractive() override;
115  bool IsDefault() override;
116  bool IsLegacy() override;
117  bool SupportsRealtime() override;
118  bool SupportsAutomation() override;
119 
120  // EffectClientInterface implementation
121 
122  bool SetHost(EffectHostInterface *host) override;
123 
124  unsigned GetAudioInCount() override;
125  unsigned GetAudioOutCount() override;
126 
127  int GetMidiInCount() override;
128  int GetMidiOutCount() override;
129 
130  sampleCount GetLatency() override;
131  size_t GetTailSize() override;
132 
133  void SetSampleRate(double rate) override;
134  size_t SetBlockSize(size_t maxBlockSize) override;
135  size_t GetBlockSize() const override;
136 
137  bool IsReady() override;
138  bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap = NULL) override;
139  bool ProcessFinalize() override;
140  size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override;
141 
142  bool RealtimeInitialize() override;
143  bool RealtimeAddProcessor(unsigned numChannels, float sampleRate) override;
144  bool RealtimeFinalize() override;
145  bool RealtimeSuspend() override;
146  bool RealtimeResume() override;
147  bool RealtimeProcessStart() override;
148  size_t RealtimeProcess(int group,
149  float **inbuf,
150  float **outbuf,
151  size_t numSamples) override;
152  bool RealtimeProcessEnd() override;
153 
154  bool ShowInterface( wxWindow &parent,
155  const EffectDialogFactory &factory, bool forceModal = false) override;
156 
157  bool GetAutomationParameters(CommandParameters & parms) override;
158  bool SetAutomationParameters(CommandParameters & parms) override;
159 
160  bool LoadUserPreset(const RegistryPath & name) override;
161  bool SaveUserPreset(const RegistryPath & name) override;
162 
163  RegistryPaths GetFactoryPresets() override;
164  bool LoadFactoryPreset(int id) override;
165  bool LoadFactoryDefaults() override;
166 
167  // EffectUIClientInterface implementation
168 
169  void SetHostUI(EffectUIHostInterface *host) override;
170  bool PopulateUI(ShuttleGui &S) override;
171  bool IsGraphicalUI() override;
172  bool ValidateUI() override;
173  bool HideUI() override;
174  bool CloseUI() override;
175 
176  bool CanExportPresets() override;
177  void ExportPresets() override;
178  void ImportPresets() override;
179 
180  bool HasOptions() override;
181  void ShowOptions() override;
182 
183  // VSTEffect implementation
184 
185  // VST plugin -> host callback
186  static intptr_t AudioMaster(AEffect *effect,
187  int32_t opcode,
188  int32_t index,
189  intptr_t value,
190  void * ptr,
191  float opt);
192 
193  void OnTimer();
194 
195 private:
196  // Plugin loading and unloading
197  bool Load();
198  void Unload();
199  std::vector<int> GetEffectIDs();
200 
201  // Parameter loading and saving
202  bool LoadParameters(const RegistryPath & group);
203  bool SaveParameters(const RegistryPath & group);
204 
205  // Base64 encoding and decoding
206  static wxString b64encode(const void *in, int len);
207  static int b64decode(const wxString &in, void *out);
208 
209  // Realtime
210  unsigned GetChannelCount();
211  void SetChannelCount(unsigned numChannels);
212 
213  // UI
214  void OnSlider(wxCommandEvent & evt);
215  void OnSizeWindow(wxCommandEvent & evt);
216  void OnUpdateDisplay(wxCommandEvent & evt);
217 
218  void RemoveHandler();
219 
220  void OnProgram(wxCommandEvent & evt);
221  void OnProgramText(wxCommandEvent & evt);
222  void OnLoad(wxCommandEvent & evt);
223  void OnSave(wxCommandEvent & evt);
224  void OnSettings(wxCommandEvent & evt);
225 
226  void BuildPlain();
227  void BuildFancy();
228  wxSizer *BuildProgramBar();
229  void RefreshParameters(int skip = -1);
230 
231  // Program/Bank loading/saving
232  bool LoadFXB(const wxFileName & fn);
233  bool LoadFXP(const wxFileName & fn);
234  bool LoadXML(const wxFileName & fn);
235  bool LoadFXProgram(unsigned char **bptr, ssize_t & len, int index, bool dryrun);
236  void SaveFXB(const wxFileName & fn);
237  void SaveFXP(const wxFileName & fn);
238  void SaveXML(const wxFileName & fn);
239  void SaveFXProgram(wxMemoryBuffer & buf, int index);
240 
241  bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
242  void HandleXMLEndTag(const wxChar *tag) override;
243  void HandleXMLContent(const wxString & content) override;
244  XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
245 
246  // Utility methods
247 
249  float GetSampleRate();
250  int GetProcessLevel();
251  void SetBufferDelay(int samples);
252  void NeedIdle();
253  void NeedEditIdle(bool state);
254  void SizeWindow(int w, int h);
255  void UpdateDisplay();
256  void Automate(int index, float value);
257  void PowerOn();
258  void PowerOff();
259 
260  int GetString(wxString & outstr, int opcode, int index = 0);
261  wxString GetString(int opcode, int index = 0);
262  void SetString(int opcode, const wxString & str, int index = 0);
263 
264  // VST methods
265 
266  intptr_t callDispatcher(int opcode, int index,
267  intptr_t value, void *ptr, float opt) override;
268  void callProcessReplacing(float **inputs, float **outputs, int sampleframes);
269  void callSetParameter(int index, float value);
270  float callGetParameter(int index);
271  void callSetProgram(int index);
272  void callSetChunk(bool isPgm, int len, void *buf);
273  void callSetChunk(bool isPgm, int len, void *buf, VstPatchChunkInfo *info);
274 
275  private:
276  // Define a manager class for a handle to a module
277 #if defined(__WXMSW__)
278  using ModuleHandle = std::unique_ptr<wxDynamicLibrary>;
279 #else
280  struct ModuleDeleter {
281  void operator() (void*) const;
282  };
283  using ModuleHandle = std::unique_ptr < char, ModuleDeleter > ;
284 #endif
285 
289  unsigned mAudioIns;
290  unsigned mAudioOuts;
291  int mMidiIns;
294  float mSampleRate;
296  wxString mName;
297  wxString mVendor;
298  wxString mDescription;
299  int mVersion;
302 
303  static intptr_t mCurrentEffectID;
304 
305  bool mReady;
306 
308 
309 #if defined(__WXMAC__)
310  // These members must be ordered after mModule
311 
312  struct BundleDeleter {
313  void operator() (void*) const;
314  };
315  using BundleHandle = std::unique_ptr<
316  __CFBundle, BundleDeleter
317  >;
318 
319  BundleHandle mBundleRef;
320 
321  struct ResourceHandle {
322  ResourceHandle(
323  CFBundleRef pHandle = nullptr, CFBundleRefNum num = 0)
324  : mpHandle{ pHandle }, mNum{ num }
325  {}
326  ResourceHandle& operator=( ResourceHandle &&other )
327  {
328  if (this != &other) {
329  mpHandle = other.mpHandle;
330  mNum = other.mNum;
331  other.mpHandle = nullptr;
332  other.mNum = 0;
333  }
334  return *this;
335  }
336  ~ResourceHandle() { reset(); }
337  void reset();
338 
339  CFBundleRef mpHandle{};
340  CFBundleRefNum mNum{};
341  };
342  ResourceHandle mResource;
343 #endif
344 
346 
348 
351 
352  unsigned mBlockSize;
353 
355  bool mHasPower;
358 
359  wxCRIT_SECT_DECLARE_MEMBER(mDispatcherLock);
360 
361  std::unique_ptr<VSTEffectTimer> mTimer;
363 
364  // Realtime processing
365  VSTEffect *mMaster; // non-NULL if a slave
367  unsigned mNumChannels;
369  size_t mNumSamples;
370 
371  // UI
372  wxDialog *mDialog;
373  wxWindow *mParent;
375  wxSizerItem *mContainer;
376  bool mGui;
377 
379 
385 
386  bool mInSet;
387  bool mInChunk;
388  wxString mChunk;
391 
392  DECLARE_EVENT_TABLE()
393 
394  friend class VSTEffectsModule;
395 };
396 
403 class VSTEffectsModule final : public ModuleInterface
404 {
405 public:
407  virtual ~VSTEffectsModule();
408 
409  // ComponentInterface implementation
410 
411  PluginPath GetPath() override;
413  VendorSymbol GetVendor() override;
414  wxString GetVersion() override;
416 
417  // ModuleInterface implementation
418 
419  bool Initialize() override;
420  void Terminate() override;
421  EffectFamilySymbol GetOptionalFamilySymbol() override;
422 
423  const FileExtensions &GetFileExtensions() override;
424  FilePath InstallPath() override;
425 
426  bool AutoRegisterPlugins(PluginManagerInterface & pm) override;
427  PluginPaths FindPluginPaths(PluginManagerInterface & pm) override;
428  unsigned DiscoverPluginsAtPath(
429  const PluginPath & path, TranslatableString &errMsg,
430  const RegistrationCallback &callback)
431  override;
432 
433  bool IsPluginValid(const PluginPath & path, bool bFast) override;
434 
435  std::unique_ptr<ComponentInterface>
436  CreateInstance(const PluginPath & path) override;
437 
438  // VSTEffectModule implementation
439 
440  static void Check(const wxChar *path);
441 };
442 
443 #endif // USE_VST
EffectUIClientInterface
EffectUIClientInterface is an abstract base class to populate a UI and validate UI values....
Definition: EffectInterface.h:271
VSTEffect::GetAudioInCount
unsigned GetAudioInCount() override
Definition: VSTEffect.cpp:1336
VSTEffect::ProcessInitialize
bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap=NULL) override
Definition: VSTEffect.cpp:1395
VSTEffect::PowerOn
void PowerOn()
Definition: VSTEffect.cpp:2450
VSTEffect::mDescription
wxString mDescription
Definition: VSTEffect.h:298
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
VSTEffect::mInChunk
bool mInChunk
Definition: VSTEffect.h:387
CommandParameters
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the Shuttle cla...
Definition: EffectAutomationParameters.h:67
VSTEffect::mMasterIn
FloatBuffers mMasterIn
Definition: VSTEffect.h:368
VSTEffect::mDialog
wxDialog * mDialog
Definition: VSTEffect.h:372
VSTEffect::mPath
PluginPath mPath
Definition: VSTEffect.h:288
VSTEffect::mBlockSize
unsigned mBlockSize
Definition: VSTEffect.h:352
VSTEffect::mModule
ModuleHandle mModule
Definition: VSTEffect.h:307
VSTEffect::IsLegacy
bool IsLegacy() override
Definition: VSTEffect.cpp:1273
VSTEffect::callDispatcher
intptr_t callDispatcher(int opcode, int index, intptr_t value, void *ptr, float opt) override
Definition: VSTEffect.cpp:2568
VSTEffect::mUseLatency
bool mUseLatency
Definition: VSTEffect.h:349
VSTEffect::SetBufferDelay
void SetBufferDelay(int samples)
Definition: VSTEffect.cpp:2527
VSTEffectsModule
Definition: VSTEffect.h:404
DECLARE_LOCAL_EVENT_TYPE
DECLARE_LOCAL_EVENT_TYPE(EVT_SIZEWINDOW, -1)
VSTControl.h
EffectHostInterface
EffectHostInterface is a decorator of a EffectUIClientInterface. It adds virtual (abstract) functions...
Definition: EffectInterface.h:121
fn
static const auto fn
Definition: WaveformView.cpp:1108
VSTEffect::b64decode
static int b64decode(const wxString &in, void *out)
Definition: VSTEffect.cpp:2702
VSTEffect::GetVendor
VendorSymbol GetVendor() override
Definition: VSTEffect.cpp:1201
VSTEffect::mAutomatable
bool mAutomatable
Definition: VSTEffect.h:293
VSTEffect::SaveFXP
void SaveFXP(const wxFileName &fn)
Definition: VSTEffect.cpp:3549
VSTEffect::mMasterOut
FloatBuffers mMasterOut
Definition: VSTEffect.h:368
VSTEffect::LoadUserPreset
bool LoadUserPreset(const RegistryPath &name) override
Definition: VSTEffect.cpp:1690
VSTEffect::mNumChannels
unsigned mNumChannels
Definition: VSTEffect.h:367
VSTEffect::HasOptions
bool HasOptions() override
Definition: VSTEffect.cpp:1976
VSTEffect::mName
wxString mName
Definition: VSTEffect.h:296
VSTEffect::HandleXMLContent
void HandleXMLContent(const wxString &content) override
Definition: VSTEffect.cpp:3975
VSTEffect::mMidiIns
int mMidiIns
Definition: VSTEffect.h:291
str
#define str(a)
Definition: DBConnection.cpp:30
VSTEffect::mUIHost
EffectUIHostInterface * mUIHost
Definition: VSTEffect.h:374
VSTEffect::UpdateDisplay
void UpdateDisplay()
Definition: VSTEffect.cpp:2500
EffectInterface.h
VSTEffect::Unload
void Unload()
Definition: VSTEffect.cpp:2269
VSTEffect::mSampleRate
float mSampleRate
Definition: VSTEffect.h:294
VSTEffect::mWantsEditIdle
bool mWantsEditIdle
Definition: VSTEffect.h:357
VSTEffect::PopulateUI
bool PopulateUI(ShuttleGui &S) override
Definition: VSTEffect.cpp:1755
VSTEffect::RefreshParameters
void RefreshParameters(int skip=-1)
Definition: VSTEffect.cpp:2968
RegistryPaths
std::vector< RegistryPath > RegistryPaths
Definition: Identifier.h:219
PluginPath
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
Definition: Identifier.h:214
VSTEffect::IsReady
bool IsReady() override
Definition: VSTEffect.cpp:1390
VSTEffect::GetAutomationParameters
bool GetAutomationParameters(CommandParameters &parms) override
Definition: VSTEffect.cpp:1640
VSTEffect::mGui
bool mGui
Definition: VSTEffect.h:376
VSTEffect::mVendor
wxString mVendor
Definition: VSTEffect.h:297
ModuleInterface.h
VSTEffect::LoadFXB
bool LoadFXB(const wxFileName &fn)
Definition: VSTEffect.cpp:3051
VSTEffect::LoadFXP
bool LoadFXP(const wxFileName &fn)
Definition: VSTEffect.cpp:3224
VSTEffect::OnSlider
void OnSlider(wxCommandEvent &evt)
Definition: VSTEffect.cpp:3041
VSTEffect::ShowOptions
void ShowOptions() override
Definition: VSTEffect.cpp:1981
VSTEffect::GetChannelCount
unsigned GetChannelCount()
Definition: VSTEffect.cpp:1445
VSTEffect::~VSTEffect
virtual ~VSTEffect()
Definition: VSTEffect.cpp:1177
VSTEffect::mWantsIdle
bool mWantsIdle
Definition: VSTEffect.h:356
VSTEffect::VSTEffect
VSTEffect(const PluginPath &path, VSTEffect *master=NULL)
Definition: VSTEffect.cpp:1129
VSTEffect::SupportsAutomation
bool SupportsAutomation() override
Definition: VSTEffect.cpp:1283
VSTEffect::ImportPresets
void ImportPresets() override
Definition: VSTEffect.cpp:1909
VSTEffect::SupportsRealtime
bool SupportsRealtime() override
Definition: VSTEffect.cpp:1278
VstPatchChunkInfo
Definition: aeffectx.h:354
VSTEffect::ValidateUI
bool ValidateUI() override
Definition: VSTEffect.cpp:1794
VSTEffect::SetHost
bool SetHost(EffectHostInterface *host) override
Definition: VSTEffect.cpp:1292
processFn
void(* processFn)(AEffect *effect, float **inputs, float **outputs, int sampleframes)
Definition: VSTEffect.h:45
VSTEffect::LoadFactoryDefaults
bool LoadFactoryDefaults() override
Definition: VSTEffect.cpp:1734
NumericTextCtrl
Definition: NumericTextCtrl.h:172
VSTEffect::RealtimeSuspend
bool RealtimeSuspend() override
Definition: VSTEffect.cpp:1512
VSTEffect::VSTEffectsModule
friend class VSTEffectsModule
Definition: VSTEffect.h:394
VSTEffect::HandleXMLChild
XMLTagHandler * HandleXMLChild(const wxChar *tag) override
Definition: VSTEffect.cpp:3983
wxArrayStringEx
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
Definition: wxArrayStringEx.h:18
VSTEffect::OnProgram
void OnProgram(wxCommandEvent &evt)
VSTEffect::RealtimeAddProcessor
bool RealtimeAddProcessor(unsigned numChannels, float sampleRate) override
Definition: VSTEffect.cpp:1463
VSTEffect::callSetParameter
void callSetParameter(int index, float value)
Definition: VSTEffect.cpp:2587
VSTEffect::HandleXMLEndTag
void HandleXMLEndTag(const wxChar *tag) override
Definition: VSTEffect.cpp:3945
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
VSTEffect::ShowInterface
bool ShowInterface(wxWindow &parent, const EffectDialogFactory &factory, bool forceModal=false) override
Definition: VSTEffect.cpp:1595
VSTEffect::RealtimeFinalize
bool RealtimeFinalize() override
Definition: VSTEffect.cpp:1499
VSTEffect::ProcessFinalize
bool ProcessFinalize() override
Definition: VSTEffect.cpp:1421
VSTEffect::SetSampleRate
void SetSampleRate(double rate) override
Definition: VSTEffect.cpp:1367
VSTEffect::mNumSamples
size_t mNumSamples
Definition: VSTEffect.h:369
VSTEffect::PowerOff
void PowerOff()
Definition: VSTEffect.cpp:2468
VSTEffect::GetDescription
TranslatableString GetDescription() override
Definition: VSTEffect.cpp:1225
VSTEffect::mHasPower
bool mHasPower
Definition: VSTEffect.h:355
VSTEffect::callSetChunk
void callSetChunk(bool isPgm, int len, void *buf)
Definition: VSTEffect.cpp:2609
ModuleInterface
Definition: ModuleInterface.h:70
VSTEffect::mSlaves
VSTEffectArray mSlaves
Definition: VSTEffect.h:366
VSTEffect::OnSettings
void OnSettings(wxCommandEvent &evt)
VSTEffect::mHost
EffectHostInterface * mHost
Definition: VSTEffect.h:286
VSTEffect::GetVersion
wxString GetVersion() override
Definition: VSTEffect.cpp:1206
VSTEffect::SetHostUI
void SetHostUI(EffectUIHostInterface *host) override
Definition: VSTEffect.cpp:1750
VSTEffect::LoadXML
bool LoadXML(const wxFileName &fn)
Definition: VSTEffect.cpp:3430
VSTEffect::LoadParameters
bool LoadParameters(const RegistryPath &group)
Definition: VSTEffect.cpp:2319
VSTEffect::GetPath
PluginPath GetPath() override
Definition: VSTEffect.cpp:1191
VSTEffect::OnLoad
void OnLoad(wxCommandEvent &evt)
XMLTagHandler.h
VSTEffect::GetMidiOutCount
int GetMidiOutCount() override
Definition: VSTEffect.cpp:1351
getParameterFn
float(* getParameterFn)(AEffect *effect, int index)
Definition: VSTEffect.h:54
VSTEffect::ModuleHandle
std::unique_ptr< char, ModuleDeleter > ModuleHandle
Definition: VSTEffect.h:283
FilePath
wxString FilePath
Definition: Project.h:20
PluginManagerInterface
Definition: PluginInterface.h:55
VSTEffect::mMaster
VSTEffect * mMaster
Definition: VSTEffect.h:365
factory
static RegisteredToolbarFactory factory
Definition: ControlToolBar.cpp:817
ArraysOf< float >
VSTEffect::mInteractive
bool mInteractive
Definition: VSTEffect.h:300
VSTEffect::mInSet
bool mInSet
Definition: VSTEffect.h:386
VSTEffect::callProcessReplacing
void callProcessReplacing(float **inputs, float **outputs, int sampleframes)
Definition: VSTEffect.cpp:2576
VSTEffect::ExportPresets
void ExportPresets() override
Definition: VSTEffect.cpp:1849
VSTEffect::HandleXMLTag
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override
Definition: VSTEffect.cpp:3701
VSTEffect::GetFamily
EffectFamilySymbol GetFamily() override
Definition: VSTEffect.cpp:1258
setParameterFn
void(* setParameterFn)(AEffect *effect, int index, float parameter)
Definition: VSTEffect.h:50
VSTEffect::IsInteractive
bool IsInteractive() override
Definition: VSTEffect.cpp:1263
VSTEffect::mXMLInfo
VstPatchChunkInfo mXMLInfo
Definition: VSTEffect.h:390
VSTEffect::NeedIdle
void NeedIdle()
Definition: VSTEffect.cpp:2422
VSTEffect::mDisplays
ArrayOf< wxStaticText * > mDisplays
Definition: VSTEffect.h:383
VSTEffect::GetBlockSize
size_t GetBlockSize() const override
Definition: VSTEffect.cpp:1362
VSTEffectTimer
Definition: VSTEffect.cpp:894
VSTEffect::mAudioIns
unsigned mAudioIns
Definition: VSTEffect.h:289
VSTEffect::IsGraphicalUI
bool IsGraphicalUI() override
Definition: VSTEffect.cpp:1789
VSTEffect::callGetParameter
float callGetParameter(int index)
Definition: VSTEffect.cpp:2582
VSTEffect::SizeWindow
void SizeWindow(int w, int h)
Definition: VSTEffect.cpp:2486
VSTEffect::mVersion
int mVersion
Definition: VSTEffect.h:299
VSTEffect::mLabels
ArrayOf< wxStaticText * > mLabels
Definition: VSTEffect.h:384
VSTEffect::mProcessLevel
int mProcessLevel
Definition: VSTEffect.h:354
PluginID
wxString PluginID
Definition: EffectManager.h:30
VSTControl
Definition: VSTControlGTK.h:25
VSTEffect::RealtimeInitialize
bool RealtimeInitialize() override
Definition: VSTEffect.cpp:1455
VSTEffect::SetChannelCount
void SetChannelCount(unsigned numChannels)
Definition: VSTEffect.cpp:1450
VSTEffect::mCurrentEffectID
static intptr_t mCurrentEffectID
Definition: VSTEffect.h:303
VSTEffect::BuildPlain
void BuildPlain()
Definition: VSTEffect.cpp:2840
name
const TranslatableString name
Definition: Distortion.cpp:98
VSTEffect::RealtimeProcess
size_t RealtimeProcess(int group, float **inbuf, float **outbuf, size_t numSamples) override
Definition: VSTEffect.cpp:1542
VSTEffect::mControl
VSTControl * mControl
Definition: VSTEffect.h:378
VSTEffect::AudioMaster
static intptr_t AudioMaster(AEffect *effect, int32_t opcode, int32_t index, intptr_t value, void *ptr, float opt)
Definition: VSTEffect.cpp:941
VSTEffect::wxCRIT_SECT_DECLARE_MEMBER
wxCRIT_SECT_DECLARE_MEMBER(mDispatcherLock)
VSTEffect::mNames
ArrayOf< wxStaticText * > mNames
Definition: VSTEffect.h:381
VSTEffect::SaveUserPreset
bool SaveUserPreset(const RegistryPath &name) override
Definition: VSTEffect.cpp:1702
VSTEffect::mContainer
wxSizerItem * mContainer
Definition: VSTEffect.h:375
VSTEffect::RealtimeProcessEnd
bool RealtimeProcessEnd() override
Definition: VSTEffect.cpp:1558
VSTEffect::GetEffectIDs
std::vector< int > GetEffectIDs()
Definition: VSTEffect.cpp:2298
VSTEffect::mSliders
ArrayOf< wxSlider * > mSliders
Definition: VSTEffect.h:382
Journal::Events::anonymous_namespace{JournalEvents.cpp}::Initialize
void Initialize()
Definition: JournalEvents.cpp:438
VSTEffect::ProcessBlock
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: VSTEffect.cpp:1430
VSTEffect::SetAutomationParameters
bool SetAutomationParameters(CommandParameters &parms) override
Definition: VSTEffect.cpp:1660
EffectClientInterface::EffectDialogFactory
std::function< wxDialog *(wxWindow &parent, EffectHostInterface *, EffectUIClientInterface *) > EffectDialogFactory
Definition: EffectInterface.h:190
VSTEffect::BuildFancy
void BuildFancy()
Definition: VSTEffect.cpp:2802
VSTEffect::SaveParameters
bool SaveParameters(const RegistryPath &group)
Definition: VSTEffect.cpp:2363
VSTEffectArray
std::vector< std::unique_ptr< VSTEffect > > VSTEffectArray
Definition: VSTEffect.h:81
VSTEffect::mTimeInfo
VstTimeInfo mTimeInfo
Definition: VSTEffect.h:347
ChannelNames
enum ChannelName * ChannelNames
VSTEffect::RealtimeResume
bool RealtimeResume() override
Definition: VSTEffect.cpp:1522
EffectUIHostInterface
EffectUIHostInterface has nothing in it. It is provided so that an Effect can call SetHostUI passing ...
Definition: EffectInterface.h:257
VSTEffect::Load
bool Load()
Definition: VSTEffect.cpp:1998
VSTEffect::b64encode
static wxString b64encode(const void *in, int len)
Definition: VSTEffect.cpp:2662
XMLTagHandler
This class is an interface which should be implemented by classes which wish to be able to load and s...
Definition: XMLTagHandler.h:62
RegistryPath
wxString RegistryPath
Definition: Identifier.h:218
VSTEffect::NeedEditIdle
void NeedEditIdle(bool state)
Definition: VSTEffect.cpp:2428
EffectClientInterface
EffectClientInterface provides the ident interface to Effect, and is what makes Effect into a plug-in...
Definition: EffectInterface.h:185
VSTEffect::mDuration
NumericTextCtrl * mDuration
Definition: VSTEffect.h:380
VSTEffect::RemoveHandler
void RemoveHandler()
Definition: VSTEffect.cpp:2780
VSTEffect::IsDefault
bool IsDefault() override
Definition: VSTEffect.cpp:1268
VSTEffect::GetTailSize
size_t GetTailSize() override
Definition: VSTEffect.cpp:1385
VSTEffect::mID
PluginID mID
Definition: VSTEffect.h:287
VSTEffect::OnSave
void OnSave(wxCommandEvent &evt)
PluginPaths
std::vector< PluginPath > PluginPaths
Definition: Identifier.h:215
VSTEffect::mAEffect
AEffect * mAEffect
Definition: VSTEffect.h:345
VSTEffect::SaveFXB
void SaveFXB(const wxFileName &fn)
Definition: VSTEffect.cpp:3462
VSTEffect::CloseUI
bool CloseUI() override
Definition: VSTEffect.cpp:1814
VSTEffect::mVstVersion
int mVstVersion
Definition: VSTEffect.h:301
dispatcherFn
intptr_t(* dispatcherFn)(AEffect *effect, int opCode, int index, intptr_t value, void *ptr, float opt)
Definition: VSTEffect.h:38
VSTEffect::mXMLVersion
long mXMLVersion
Definition: VSTEffect.h:389
sampleCount
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:18
VSTEffect::GetProcessLevel
int GetProcessLevel()
Definition: VSTEffect.cpp:2445
VSTEffect::SetString
void SetString(int opcode, const wxString &str, int index=0)
Definition: VSTEffect.cpp:2560
VSTEffect::mMidiOuts
int mMidiOuts
Definition: VSTEffect.h:292
VSTEffect::GetType
EffectType GetType() override
Definition: VSTEffect.cpp:1237
VSTEffect
Definition: VSTEffect.h:97
VSTEffect::GetLatency
sampleCount GetLatency() override
Definition: VSTEffect.cpp:1372
VSTEffect::mUserBlockSize
size_t mUserBlockSize
Definition: VSTEffect.h:295
VSTEffect::HideUI
bool HideUI() override
Definition: VSTEffect.cpp:1809
VSTEffect::Automate
void Automate(int index, float value)
Definition: VSTEffect.cpp:2513
VSTEffect::GetAudioOutCount
unsigned GetAudioOutCount() override
Definition: VSTEffect.cpp:1341
VSTEffect::GetString
int GetString(wxString &outstr, int opcode, int index=0)
Definition: VSTEffect.cpp:2538
VSTEffect::ModuleDeleter::operator()
void operator()(void *) const
Definition: VSTEffect.cpp:1106
VSTEffect::mReady
bool mReady
Definition: VSTEffect.h:305
VSTEffect::mBufferDelay
int mBufferDelay
Definition: VSTEffect.h:350
VSTEffect::mTimerGuard
int mTimerGuard
Definition: VSTEffect.h:362
PluginInterface.h
VSTEffect::OnSizeWindow
void OnSizeWindow(wxCommandEvent &evt)
Definition: VSTEffect.cpp:3019
audioMasterCallback
intptr_t(* audioMasterCallback)(AEffect *, int32_t, int32_t, intptr_t, void *, float)
Definition: aeffectx.h:337
VSTEffect::SetBlockSize
size_t SetBlockSize(size_t maxBlockSize) override
Definition: VSTEffect.cpp:1356
VSTEffect::ModuleDeleter
Definition: VSTEffect.h:280
AEffect
VST Effects class, conforming to VST layout.
Definition: aeffectx.h:258
VSTEffect::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: VSTEffect.cpp:1196
VSTEffect::SaveFXProgram
void SaveFXProgram(wxMemoryBuffer &buf, int index)
Definition: VSTEffect.cpp:3584
VSTEffect::mChunk
wxString mChunk
Definition: VSTEffect.h:388
VSTEffect::LoadFXProgram
bool LoadFXProgram(unsigned char **bptr, ssize_t &len, int index, bool dryrun)
Definition: VSTEffect.cpp:3276
VSTEffect::OnProgramText
void OnProgramText(wxCommandEvent &evt)
VSTEffect::CanExportPresets
bool CanExportPresets() override
Definition: VSTEffect.cpp:1843
VSTEffect::mParent
wxWindow * mParent
Definition: VSTEffect.h:373
ModuleInterface::RegistrationCallback
std::function< const PluginID &(ModuleInterface *, ComponentInterface *) > RegistrationCallback
Definition: ModuleInterface.h:123
VSTEffect::mAudioOuts
unsigned mAudioOuts
Definition: VSTEffect.h:290
VSTEffect::BuildProgramBar
wxSizer * BuildProgramBar()
EffectType
EffectType
Definition: EffectInterface.h:55
VSTEffect::callSetProgram
void callSetProgram(int index)
Definition: VSTEffect.cpp:2598
VSTEffect::GetSampleRate
float GetSampleRate()
Definition: VSTEffect.cpp:2440
VSTEffect::OnTimer
void OnTimer()
Definition: VSTEffect.cpp:2397
VSTEffect::GetTimeInfo
VstTimeInfo * GetTimeInfo()
Definition: VSTEffect.cpp:2434
SampleFormat.h
VSTEffect::OnUpdateDisplay
void OnUpdateDisplay(wxCommandEvent &evt)
VstTimeInfo
Definition: aeffectx.h:306
ArrayOf< wxStaticText * >
VSTEffect::RealtimeProcessStart
bool RealtimeProcessStart() override
Definition: VSTEffect.cpp:1532
VSTEffect::mTimer
std::unique_ptr< VSTEffectTimer > mTimer
Definition: VSTEffect.h:361
VSTEffect::GetMidiInCount
int GetMidiInCount() override
Definition: VSTEffect.cpp:1346
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631
VSTEffect::GetFactoryPresets
RegistryPaths GetFactoryPresets() override
Definition: VSTEffect.cpp:1707
VSTEffect::SaveXML
void SaveXML(const wxFileName &fn)
Definition: VSTEffect.cpp:3643
VSTEffect::LoadFactoryPreset
bool LoadFactoryPreset(int id) override
Definition: VSTEffect.cpp:1725