Browse Source

Export version to LV2 data

Signed-off-by: falkTX <falktx@falktx.com>
tags/2020-07-14
falkTX 4 years ago
parent
commit
53db28d9ec
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      libs/juce-legacy/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper_Exporter.cpp

+ 19
- 0
libs/juce-legacy/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper_Exporter.cpp View File

@@ -183,6 +183,25 @@ static const String makePluginFile (AudioProcessor* const filter, const int maxN
text += " <" LV2_PROGRAMS__Interface "> ;\n";
text += "\n";

#ifdef JucePlugin_VersionCode
// Version
{
const uint32_t version = JucePlugin_VersionCode;

const uint32_t majorVersion = (version & 0xFF0000) >> 16;
const uint32_t microVersion = (version & 0x00FF00) >> 8;
/* */ uint32_t minorVersion = (version & 0x0000FF) >> 0;

// NOTE: LV2 ignores 'major' version and says 0 for minor is pre-release/unstable.
if (majorVersion > 0)
minorVersion += 2;

text += " lv2:microVersion " + String(microVersion) + " ;\n";
text += " lv2:minorVersion " + String(minorVersion) + " ;\n";
text += "\n";
}
#endif

#if ! JUCE_AUDIOPROCESSOR_NO_GUI
// UIs
if (filter->hasEditor())


Loading…
Cancel
Save