diff --git a/examples/CairoUI/CairoExamplePlugin.cpp b/examples/CairoUI/CairoExamplePlugin.cpp index 38891516..f22f1552 100644 --- a/examples/CairoUI/CairoExamplePlugin.cpp +++ b/examples/CairoUI/CairoExamplePlugin.cpp @@ -54,6 +54,19 @@ public: return d_cconst('d', 'C', 'a', 'i'); } + /** + Initialize the audio port @a index.@n + This function will be called once, shortly after the plugin is created. + */ + void initAudioPort(bool input, uint32_t index, AudioPort& port) override + { + // treat meter audio ports as stereo + port.groupId = kPortGroupMono; + + // everything else is as default + Plugin::initAudioPort(input, index, port); + } + void initParameter(uint32_t index, Parameter& parameter) { // unused diff --git a/examples/CairoUI/Makefile b/examples/CairoUI/Makefile index 2c2c2489..309654a4 100644 --- a/examples/CairoUI/Makefile +++ b/examples/CairoUI/Makefile @@ -40,7 +40,8 @@ endif # HAVE_LIBLO endif # MACOS_OR_WINDOWS TARGETS += lv2_sep -TARGETS += vst +TARGETS += vst2 +TARGETS += vst3 endif # HAVE_CAIRO diff --git a/examples/EmbedExternalUI/EmbedExternalExamplePlugin.cpp b/examples/EmbedExternalUI/EmbedExternalExamplePlugin.cpp index 0eb65941..e16b318d 100644 --- a/examples/EmbedExternalUI/EmbedExternalExamplePlugin.cpp +++ b/examples/EmbedExternalUI/EmbedExternalExamplePlugin.cpp @@ -99,6 +99,19 @@ protected: /* -------------------------------------------------------------------------------------------------------- * Init */ + /** + Initialize the audio port @a index.@n + This function will be called once, shortly after the plugin is created. + */ + void initAudioPort(bool input, uint32_t index, AudioPort& port) override + { + // treat meter audio ports as stereo + port.groupId = kPortGroupStereo; + + // everything else is as default + Plugin::initAudioPort(input, index, port); + } + /** Initialize the parameter @a index. This function will be called once, shortly after the plugin is created. diff --git a/examples/FileHandling/FileHandlingPlugin.cpp b/examples/FileHandling/FileHandlingPlugin.cpp index 691a4557..1a00ddfc 100644 --- a/examples/FileHandling/FileHandlingPlugin.cpp +++ b/examples/FileHandling/FileHandlingPlugin.cpp @@ -98,6 +98,19 @@ protected: /* -------------------------------------------------------------------------------------------------------- * Init */ + /** + Initialize the audio port @a index.@n + This function will be called once, shortly after the plugin is created. + */ + void initAudioPort(bool input, uint32_t index, AudioPort& port) override + { + // treat meter audio ports as stereo + port.groupId = kPortGroupMono; + + // everything else is as default + Plugin::initAudioPort(input, index, port); + } + /** Initialize the parameter @a index. This function will be called once, shortly after the plugin is created. diff --git a/examples/FileHandling/Makefile b/examples/FileHandling/Makefile index 23cd6399..1ebd4027 100644 --- a/examples/FileHandling/Makefile +++ b/examples/FileHandling/Makefile @@ -34,7 +34,8 @@ else TARGETS += lv2_dsp endif -TARGETS += vst +TARGETS += vst2 +TARGETS += vst3 all: $(TARGETS) diff --git a/examples/Info/InfoExamplePlugin.cpp b/examples/Info/InfoExamplePlugin.cpp index 6e339c25..36264017 100644 --- a/examples/Info/InfoExamplePlugin.cpp +++ b/examples/Info/InfoExamplePlugin.cpp @@ -103,6 +103,19 @@ protected: /* -------------------------------------------------------------------------------------------------------- * Init */ + /** + Initialize the audio port @a index.@n + This function will be called once, shortly after the plugin is created. + */ + void initAudioPort(bool input, uint32_t index, AudioPort& port) override + { + // treat meter audio ports as stereo + port.groupId = kPortGroupStereo; + + // everything else is as default + Plugin::initAudioPort(input, index, port); + } + /** Initialize the parameter @a index. This function will be called once, shortly after the plugin is created. diff --git a/examples/Latency/LatencyExamplePlugin.cpp b/examples/Latency/LatencyExamplePlugin.cpp index 2d264a34..cc40bd50 100644 --- a/examples/Latency/LatencyExamplePlugin.cpp +++ b/examples/Latency/LatencyExamplePlugin.cpp @@ -108,6 +108,19 @@ protected: /* -------------------------------------------------------------------------------------------------------- * Init */ + /** + Initialize the audio port @a index.@n + This function will be called once, shortly after the plugin is created. + */ + void initAudioPort(bool input, uint32_t index, AudioPort& port) override + { + // treat meter audio ports as stereo + port.groupId = kPortGroupMono; + + // everything else is as default + Plugin::initAudioPort(input, index, port); + } + /** Initialize the parameter @a index. This function will be called once, shortly after the plugin is created. diff --git a/examples/Metronome/ExamplePluginMetronome.cpp b/examples/Metronome/ExamplePluginMetronome.cpp index 537e994b..83c484dc 100644 --- a/examples/Metronome/ExamplePluginMetronome.cpp +++ b/examples/Metronome/ExamplePluginMetronome.cpp @@ -150,6 +150,19 @@ protected: /* -------------------------------------------------------------------------------------------------------- * Init */ + /** + Initialize the audio port @a index.@n + This function will be called once, shortly after the plugin is created. + */ + void initAudioPort(bool input, uint32_t index, AudioPort& port) override + { + // treat meter audio ports as stereo + port.groupId = kPortGroupMono; + + // everything else is as default + Plugin::initAudioPort(input, index, port); + } + /** Initialize the parameter @a index. This function will be called once, shortly after the plugin is created. diff --git a/examples/Parameters/ExamplePluginParameters.cpp b/examples/Parameters/ExamplePluginParameters.cpp index eb466b49..4b705af2 100644 --- a/examples/Parameters/ExamplePluginParameters.cpp +++ b/examples/Parameters/ExamplePluginParameters.cpp @@ -110,6 +110,19 @@ The plugin will be treated as an effect, but it will not change the host audio." kPortGroupBottom }; + /** + Initialize the audio port @a index.@n + This function will be called once, shortly after the plugin is created. + */ + void initAudioPort(bool input, uint32_t index, AudioPort& port) override + { + // treat meter audio ports as stereo + port.groupId = kPortGroupStereo; + + // everything else is as default + Plugin::initAudioPort(input, index, port); + } + /** Initialize the parameter @a index. This function will be called once, shortly after the plugin is created. diff --git a/examples/SendNote/SendNoteExamplePlugin.cpp b/examples/SendNote/SendNoteExamplePlugin.cpp index df4899e9..937526c0 100644 --- a/examples/SendNote/SendNoteExamplePlugin.cpp +++ b/examples/SendNote/SendNoteExamplePlugin.cpp @@ -100,11 +100,20 @@ protected: } /* -------------------------------------------------------------------------------------------------------- - * Init and Internal data, unused in this plugin */ + * Init */ - void initParameter(uint32_t, Parameter&) override {} - float getParameterValue(uint32_t) const override { return 0.0f;} - void setParameterValue(uint32_t, float) override {} + /** + Initialize the audio port @a index.@n + This function will be called once, shortly after the plugin is created. + */ + void initAudioPort(bool input, uint32_t index, AudioPort& port) override + { + // treat meter audio ports as stereo + port.groupId = kPortGroupMono; + + // everything else is as default + Plugin::initAudioPort(input, index, port); + } /* -------------------------------------------------------------------------------------------------------- * Audio/MIDI Processing */ diff --git a/examples/States/ExamplePluginStates.cpp b/examples/States/ExamplePluginStates.cpp index 9808952c..119935cf 100644 --- a/examples/States/ExamplePluginStates.cpp +++ b/examples/States/ExamplePluginStates.cpp @@ -104,6 +104,19 @@ The plugin will be treated as an effect, but it will not change the host audio." /* -------------------------------------------------------------------------------------------------------- * Init */ + /** + Initialize the audio port @a index.@n + This function will be called once, shortly after the plugin is created. + */ + void initAudioPort(bool input, uint32_t index, AudioPort& port) override + { + // treat meter audio ports as stereo + port.groupId = kPortGroupStereo; + + // everything else is as default + Plugin::initAudioPort(input, index, port); + } + /** Set the name of the program @a index. This function will be called once, shortly after the plugin is created.