Audacity 3.2.0
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#ifndef __AUDACITY_VST_EFFECT__
12#define __AUDACITY_VST_EFFECT__
13
14#include "VSTEffectBase.h"
15#include "../StatelessPerTrackEffect.h"
16
17#include "SampleFormat.h"
18
19#include <optional>
20#include <atomic>
21
22typedef intptr_t (*dispatcherFn)(AEffect * effect,
23 int opCode,
24 int index,
25 intptr_t value,
26 void *ptr,
27 float opt);
28
29typedef void (*processFn)(AEffect * effect,
30 float **inputs,
31 float **outputs,
32 int sampleframes);
33
34typedef void (*setParameterFn)(AEffect * effect,
35 int index,
36 float parameter);
37
38typedef float (*getParameterFn)(AEffect * effect,
39 int index);
40
41typedef AEffect *(*vstPluginMain)(audioMasterCallback audioMaster);
42
44//
45// VSTEffect
46//
48
49
50class VSTEditor;
51
52class VSTEffect final
54 , public VSTEffectBase
55{
56public:
58 ~VSTEffect() override;
59
60private:
61 int ShowClientInterface(const EffectPlugin &plugin, wxWindow &parent,
62 wxDialog &dialog, EffectEditor *pEditor, bool forceModal)
63 const override;
64
65 std::unique_ptr<EffectEditor> PopulateUI(const EffectPlugin &plugin,
67 const EffectOutputs *pOutputs) const override;
68
69 void ExportPresets(
70 const EffectPlugin &plugin, const EffectSettings &settings)
71 const override;
72
74 const EffectPlugin &plugin, EffectSettings &settings) const override;
75
76 // Non-const and non-virtual function:
78 void ShowOptions(const EffectPlugin &plugin) const override;
79
81 virtual std::unique_ptr<EffectEditor> MakeEditor(
82 ShuttleGui & S, EffectInstance &instance, EffectSettingsAccess &access,
83 const EffectOutputs *pOutputs) const final;
84};
85
86#endif
std::optional< std::unique_ptr< EffectSettingsAccess::Message > > OptionalMessage
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:51
void(* processFn)(AEffect *effect, float **inputs, float **outputs, int sampleframes)
Definition: VSTEffect.h:29
void(* setParameterFn)(AEffect *effect, int index, float parameter)
Definition: VSTEffect.h:34
float(* getParameterFn)(AEffect *effect, int index)
Definition: VSTEffect.h:38
intptr_t(* dispatcherFn)(AEffect *effect, int opCode, int index, intptr_t value, void *ptr, float opt)
Definition: VSTEffect.h:22
intptr_t(* audioMasterCallback)(AEffect *, int32_t, int32_t, intptr_t, void *, float)
Definition: aeffectx.h:337
VST Effects class, conforming to VST layout.
Definition: aeffectx.h:258
Performs effect computation.
Hold values to send to effect output meters.
Factory of instances of an effect.
Definition: EffectPlugin.h:36
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
VSTEffectBase(const PluginPath &path)
std::unique_ptr< EffectEditor > PopulateUI(const EffectPlugin &plugin, ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const override
Adds controls to a panel that is given as the parent window of S
Definition: VSTEffect.cpp:97
int ShowClientInterface(const EffectPlugin &plugin, wxWindow &parent, wxDialog &dialog, EffectEditor *pEditor, bool forceModal) const override
Definition: VSTEffect.cpp:86
OptionalMessage ImportPresetsNC(EffectSettings &settings)
Definition: VSTEffect.cpp:222
virtual std::unique_ptr< EffectEditor > MakeEditor(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const final
Will never be called.
Definition: VSTEffect.cpp:139
void ShowOptions(const EffectPlugin &plugin) const override
Definition: VSTEffect.cpp:291
void ExportPresets(const EffectPlugin &plugin, const EffectSettings &settings) const override
Definition: VSTEffect.cpp:149
OptionalMessage ImportPresets(const EffectPlugin &plugin, EffectSettings &settings) const override
Definition: VSTEffect.cpp:213
~VSTEffect() override
Externalized state of a plug-in.