Browse Source

Set audio port group hints for most example plugins, fixing vst3

Signed-off-by: falkTX <falktx@falktx.com>
pull/321/head
falkTX 3 years ago
parent
commit
d41b971d77
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
11 changed files with 121 additions and 6 deletions
  1. +13
    -0
      examples/CairoUI/CairoExamplePlugin.cpp
  2. +2
    -1
      examples/CairoUI/Makefile
  3. +13
    -0
      examples/EmbedExternalUI/EmbedExternalExamplePlugin.cpp
  4. +13
    -0
      examples/FileHandling/FileHandlingPlugin.cpp
  5. +2
    -1
      examples/FileHandling/Makefile
  6. +13
    -0
      examples/Info/InfoExamplePlugin.cpp
  7. +13
    -0
      examples/Latency/LatencyExamplePlugin.cpp
  8. +13
    -0
      examples/Metronome/ExamplePluginMetronome.cpp
  9. +13
    -0
      examples/Parameters/ExamplePluginParameters.cpp
  10. +13
    -4
      examples/SendNote/SendNoteExamplePlugin.cpp
  11. +13
    -0
      examples/States/ExamplePluginStates.cpp

+ 13
- 0
examples/CairoUI/CairoExamplePlugin.cpp View File

@@ -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


+ 2
- 1
examples/CairoUI/Makefile View File

@@ -40,7 +40,8 @@ endif # HAVE_LIBLO
endif # MACOS_OR_WINDOWS

TARGETS += lv2_sep
TARGETS += vst
TARGETS += vst2
TARGETS += vst3

endif # HAVE_CAIRO



+ 13
- 0
examples/EmbedExternalUI/EmbedExternalExamplePlugin.cpp View File

@@ -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.


+ 13
- 0
examples/FileHandling/FileHandlingPlugin.cpp View File

@@ -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.


+ 2
- 1
examples/FileHandling/Makefile View File

@@ -34,7 +34,8 @@ else
TARGETS += lv2_dsp
endif

TARGETS += vst
TARGETS += vst2
TARGETS += vst3

all: $(TARGETS)



+ 13
- 0
examples/Info/InfoExamplePlugin.cpp View File

@@ -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.


+ 13
- 0
examples/Latency/LatencyExamplePlugin.cpp View File

@@ -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.


+ 13
- 0
examples/Metronome/ExamplePluginMetronome.cpp View File

@@ -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.


+ 13
- 0
examples/Parameters/ExamplePluginParameters.cpp View File

@@ -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.


+ 13
- 4
examples/SendNote/SendNoteExamplePlugin.cpp View File

@@ -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 */


+ 13
- 0
examples/States/ExamplePluginStates.cpp View File

@@ -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.


Loading…
Cancel
Save