DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 4e2e3a8a387a1850f174b635561f672885b4a370
parent 4634b0c950ec7a40d15a550c502a9dafb8127b8c
Author: falkTX <falktx@falktx.com>
Date:   Sat, 24 Feb 2024 21:14:05 +0100

Rework how AU macros are defined, use it for other formats

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/DistrhoInfo.hpp | 14++++++--------
Mdistrho/DistrhoPlugin.hpp | 11++++++++++-
Mdistrho/DistrhoUtils.hpp | 12+++++++++---
Mdistrho/src/DistrhoDefines.h | 3+++
Mdistrho/src/DistrhoPluginAU.cpp | 33+++++++++------------------------
Mdistrho/src/DistrhoPluginChecks.h | 15+++++++++++++++
Mdistrho/src/DistrhoPluginExport.cpp | 24+++++++-----------------
Mdistrho/src/DistrhoUIAU.mm | 12++++++------
Mexamples/CairoUI/CairoExamplePlugin.cpp | 11+----------
Mexamples/CairoUI/DistrhoPluginInfo.h | 16++++++++--------
Mexamples/Info/DistrhoPluginInfo.h | 4++--
Mexamples/Info/InfoExamplePlugin.cpp | 11+----------
Mexamples/Meters/DistrhoPluginInfo.h | 6+++---
Mexamples/Meters/ExamplePluginMeters.cpp | 11+----------
Mexamples/MidiThrough/DistrhoPluginInfo.h | 4++--
Mexamples/MidiThrough/MidiThroughExamplePlugin.cpp | 11+----------
Mexamples/Parameters/DistrhoPluginInfo.h | 4++--
Mexamples/Parameters/ExamplePluginParameters.cpp | 11+----------
Mexamples/SendNote/DistrhoPluginInfo.h | 4++--
Mexamples/SendNote/SendNoteExamplePlugin.cpp | 11+----------
Mexamples/States/DistrhoPluginInfo.h | 4++--
Mexamples/States/ExamplePluginStates.cpp | 11+----------
22 files changed, 93 insertions(+), 150 deletions(-)

diff --git a/distrho/DistrhoInfo.hpp b/distrho/DistrhoInfo.hpp @@ -675,20 +675,18 @@ START_NAMESPACE_DISTRHO #define DISTRHO_PLUGIN_AU_TYPE aufx /** - The AudioUnit subtype for a plugin.@n - This is a 4-character symbol which identifies a plugin.@n - It must be unique within a manufacturer's plugins, but different manufacturers can use the same subtype. + A 4-character symbol that identifies a brand or manufacturer, with at least one non-lower case character.@n + Plugins from the same brand should use the same symbol. @note This macro is required when building AU plugins */ -#define DISTRHO_PLUGIN_AU_SUBTYPE test +#define DISTRHO_PLUGIN_BRAND_ID Dstr /** - The AudioUnit manufacturer for a plugin.@n - This is a 4-character symbol with at least one non-lower case character.@n - Plugins from the same brand/maker should use the same symbol. + A 4-character symbol which identifies a plugin.@n + It must be unique within at least a set of plugins from the brand. @note This macro is required when building AU plugins */ -#define DISTRHO_PLUGIN_AU_MANUFACTURER Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID test /** Custom LV2 category for the plugin.@n diff --git a/distrho/DistrhoPlugin.hpp b/distrho/DistrhoPlugin.hpp @@ -222,10 +222,19 @@ protected: /** Get the plugin unique Id.@n - This value is used by LADSPA, DSSI, VST2, VST3 and AU plugin formats. + This value is used by LADSPA, DSSI, VST2, VST3 and AUv2 plugin formats.@n + @note It is preferred that you set DISTRHO_PLUGIN_UNIQUE_ID macro instead of overriding this call, + as that is required for AUv2 plugins anyhow. @see d_cconst() */ + #ifdef DISTRHO_PLUGIN_UNIQUE_ID + virtual int64_t getUniqueId() const + { + return d_cconst(STRINGIFY(DISTRHO_PLUGIN_UNIQUE_ID)); + } + #else virtual int64_t getUniqueId() const = 0; + #endif /* -------------------------------------------------------------------------------------------------------- * Init */ diff --git a/distrho/DistrhoUtils.hpp b/distrho/DistrhoUtils.hpp @@ -55,9 +55,6 @@ inline float round(float __x) # define M_PI 3.14159265358979323846 #endif -#define DISTRHO_MACRO_AS_STRING_VALUE(MACRO) #MACRO -#define DISTRHO_MACRO_AS_STRING(MACRO) DISTRHO_MACRO_AS_STRING_VALUE(MACRO) - /* -------------------------------------------------------------------------------------------------------------------- * misc functions */ @@ -78,6 +75,15 @@ int64_t d_cconst(const uint8_t a, const uint8_t b, const uint8_t c, const uint8_ } /** + Return a 32-bit number from 4 ASCII characters. + */ +static inline constexpr +uint32_t d_cconst(const char str[4]) +{ + return (str[0] << 24) | (str[1] << 16) | (str[2] << 8) | str[3]; +} + +/** Return an hexadecimal representation of a MAJ.MIN.MICRO version number. */ static inline constexpr diff --git a/distrho/src/DistrhoDefines.h b/distrho/src/DistrhoDefines.h @@ -212,6 +212,8 @@ private: \ /* Useful macros */ #define ARRAY_SIZE(ARRAY) (sizeof(ARRAY)/sizeof(ARRAY[0])) +#define STRINGIFY2(s) #s +#define STRINGIFY(s) STRINGIFY2(s) /* Useful typedefs */ typedef unsigned char uchar; @@ -223,5 +225,6 @@ typedef unsigned long long int ulonglong; /* Deprecated macros */ #define DISTRHO_DECLARE_NON_COPY_CLASS(ClassName) DISTRHO_DECLARE_NON_COPYABLE(ClassName) #define DISTRHO_DECLARE_NON_COPY_STRUCT(StructName) DISTRHO_DECLARE_NON_COPYABLE(StructName) +#define DISTRHO_MACRO_AS_STRING(MACRO) STRINGIFY2(MACRO) #endif // DISTRHO_DEFINES_H_INCLUDED diff --git a/distrho/src/DistrhoPluginAU.cpp b/distrho/src/DistrhoPluginAU.cpp @@ -31,12 +31,12 @@ #include <map> #include <vector> -#ifndef DISTRHO_PLUGIN_AU_SUBTYPE -# error DISTRHO_PLUGIN_AU_SUBTYPE undefined! +#ifndef DISTRHO_PLUGIN_BRAND_ID +# error DISTRHO_PLUGIN_BRAND_ID undefined! #endif -#ifndef DISTRHO_PLUGIN_AU_MANUFACTURER -# error DISTRHO_PLUGIN_AU_MANUFACTURER undefined! +#ifndef DISTRHO_PLUGIN_UNIQUE_ID +# error DISTRHO_PLUGIN_UNIQUE_ID undefined! #endif START_NAMESPACE_DISTRHO @@ -167,26 +167,11 @@ static const char* AudioUnitSelector2Str(const SInt16 selector) noexcept return "[unknown]"; } -static constexpr FourCharCode getFourCharCodeFromString(const char str[4]) -{ - return (str[0] << 24) + (str[1] << 16) + (str[2] << 8) + str[3]; -} - // -------------------------------------------------------------------------------------------------------------------- -#define MACRO_STR2(s) #s -#define MACRO_STR(s) MACRO_STR2(s) - -static constexpr const char kTypeStr[] = MACRO_STR(DISTRHO_PLUGIN_AU_TYPE); -static constexpr const char kSubTypeStr[] = MACRO_STR(DISTRHO_PLUGIN_AU_SUBTYPE); -static constexpr const char kManufacturerStr[] = MACRO_STR(DISTRHO_PLUGIN_AU_MANUFACTURER); - -#undef MACRO_STR -#undef MACRO_STR2 - -static constexpr const FourCharCode kType = getFourCharCodeFromString(kTypeStr); -static constexpr const FourCharCode kSubType = getFourCharCodeFromString(kSubTypeStr); -static constexpr const FourCharCode kManufacturer = getFourCharCodeFromString(kManufacturerStr); +static constexpr const uint32_t kType = d_cconst(STRINGIFY(DISTRHO_PLUGIN_AU_TYPE)); +static constexpr const uint32_t kSubType = d_cconst(STRINGIFY(DISTRHO_PLUGIN_UNIQUE_ID)); +static constexpr const uint32_t kManufacturer = d_cconst(STRINGIFY(DISTRHO_PLUGIN_BRAND_ID)); // -------------------------------------------------------------------------------------------------------------------- @@ -811,8 +796,8 @@ public: #define MACRO_STR(a, b, c) MACRO_STR2(a, b, c) info->mCocoaAUViewClass[0] = CFSTR("CocoaAUView_" MACRO_STR(DISTRHO_PLUGIN_AU_TYPE, - DISTRHO_PLUGIN_AU_SUBTYPE, - DISTRHO_PLUGIN_AU_MANUFACTURER)); + DISTRHO_PLUGIN_UNIQUE_ID, + DISTRHO_PLUGIN_BRAND_ID)); #undef MACRO_STR #undef MACRO_STR2 diff --git a/distrho/src/DistrhoPluginChecks.h b/distrho/src/DistrhoPluginChecks.h @@ -43,6 +43,21 @@ #endif // -------------------------------------------------------------------------------------------------------------------- +// Check that symbol macros are well defined + +#ifdef DISTRHO_PLUGIN_AU_TYPE +static_assert(sizeof(STRINGIFY(DISTRHO_PLUGIN_AU_TYPE)) == 5, "The macro DISTRHO_PLUGIN_AU_TYPE has incorrect length"); +#endif + +#ifdef DISTRHO_PLUGIN_BRAND_ID +static_assert(sizeof(STRINGIFY(DISTRHO_PLUGIN_BRAND_ID)) == 5, "The macro DISTRHO_PLUGIN_BRAND_ID has incorrect length"); +#endif + +#ifdef DISTRHO_PLUGIN_UNIQUE_ID +static_assert(sizeof(STRINGIFY(DISTRHO_PLUGIN_UNIQUE_ID)) == 5, "The macro DISTRHO_PLUGIN_UNIQUE_ID has incorrect length"); +#endif + +// -------------------------------------------------------------------------------------------------------------------- // Define optional macros if not done yet #ifndef DISTRHO_PLUGIN_HAS_UI diff --git a/distrho/src/DistrhoPluginExport.cpp b/distrho/src/DistrhoPluginExport.cpp @@ -17,12 +17,12 @@ #include "DistrhoPluginInternal.hpp" #include "../DistrhoPluginUtils.hpp" -#ifndef DISTRHO_PLUGIN_AU_SUBTYPE -# error DISTRHO_PLUGIN_AU_SUBTYPE undefined! +#ifndef DISTRHO_PLUGIN_BRAND_ID +# error DISTRHO_PLUGIN_BRAND_ID undefined! #endif -#ifndef DISTRHO_PLUGIN_AU_MANUFACTURER -# error DISTRHO_PLUGIN_AU_MANUFACTURER undefined! +#ifndef DISTRHO_PLUGIN_UNIQUE_ID +# error DISTRHO_PLUGIN_UNIQUE_ID undefined! #endif #include <fstream> @@ -45,13 +45,6 @@ void generate_au_plist(const PluginExporter& plugin, const uint32_t minorVersion = (version & 0x00FF00) >> 8; const uint32_t microVersion = (version & 0x0000FF) >> 0; - #define MACRO_STR2(s) #s - #define MACRO_STR(s) MACRO_STR2(s) - - static_assert(sizeof(MACRO_STR(DISTRHO_PLUGIN_AU_TYPE)) == 5, "The macro DISTRHO_PLUGIN_AU_TYPE has incorrect length"); - static_assert(sizeof(MACRO_STR(DISTRHO_PLUGIN_AU_SUBTYPE)) == 5, "The macro DISTRHO_PLUGIN_AU_SUBTYPE has incorrect length"); - static_assert(sizeof(MACRO_STR(DISTRHO_PLUGIN_AU_MANUFACTURER)) == 5, "The macro DISTRHO_PLUGIN_AU_MANUFACTURER has incorrect length"); - outputFile << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; outputFile << "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"; outputFile << "<plist>\n"; @@ -88,11 +81,11 @@ void generate_au_plist(const PluginExporter& plugin, outputFile << " <key>factoryFunction</key>\n"; outputFile << " <string>PluginAUFactory</string>\n"; outputFile << " <key>type</key>\n"; - outputFile << " <string>" MACRO_STR(DISTRHO_PLUGIN_AU_TYPE) "</string>\n"; + outputFile << " <string>" STRINGIFY(DISTRHO_PLUGIN_AU_TYPE) "</string>\n"; outputFile << " <key>subtype</key>\n"; - outputFile << " <string>" MACRO_STR(DISTRHO_PLUGIN_AU_SUBTYPE) "</string>\n"; + outputFile << " <string>" STRINGIFY(DISTRHO_PLUGIN_UNIQUE_ID) "</string>\n"; outputFile << " <key>manufacturer</key>\n"; - outputFile << " <string>" MACRO_STR(DISTRHO_PLUGIN_AU_MANUFACTURER) "</string>\n"; + outputFile << " <string>" STRINGIFY(DISTRHO_PLUGIN_BRAND_ID) "</string>\n"; outputFile << " <key>version</key>\n"; outputFile << " <integer>" << version << "</integer>\n"; outputFile << " <key>resourceUsage</key>\n"; @@ -107,9 +100,6 @@ void generate_au_plist(const PluginExporter& plugin, outputFile << " </dict>\n"; outputFile << "</plist>\n"; - #undef MACRO_STR - #undef MACRO_STR2 - outputFile.close(); std::cout << " done!" << std::endl; } diff --git a/distrho/src/DistrhoUIAU.mm b/distrho/src/DistrhoUIAU.mm @@ -26,12 +26,12 @@ #undef Point #undef Size -#ifndef DISTRHO_PLUGIN_AU_SUBTYPE -# error DISTRHO_PLUGIN_AU_SUBTYPE undefined! +#ifndef DISTRHO_PLUGIN_BRAND_ID +# error DISTRHO_PLUGIN_BRAND_ID undefined! #endif -#ifndef DISTRHO_PLUGIN_AU_MANUFACTURER -# error DISTRHO_PLUGIN_AU_MANUFACTURER undefined! +#ifndef DISTRHO_PLUGIN_UNIQUE_ID +# error DISTRHO_PLUGIN_UNIQUE_ID undefined! #endif START_NAMESPACE_DISTRHO @@ -383,7 +383,7 @@ END_NAMESPACE_DISTRHO // -------------------------------------------------------------------------------------------------------------------- #define COCOA_VIEW_CLASS_NAME \ - MACRO_NAME(CocoaView_, DISTRHO_PLUGIN_AU_TYPE, _, DISTRHO_PLUGIN_AU_SUBTYPE, _, DISTRHO_PLUGIN_AU_MANUFACTURER) + MACRO_NAME(CocoaView_, DISTRHO_PLUGIN_AU_TYPE, _, DISTRHO_PLUGIN_UNIQUE_ID, _, DISTRHO_PLUGIN_BRAND_ID) @interface COCOA_VIEW_CLASS_NAME : NSView { @@ -424,7 +424,7 @@ END_NAMESPACE_DISTRHO // -------------------------------------------------------------------------------------------------------------------- #define COCOA_UI_CLASS_NAME \ - MACRO_NAME(CocoaAUView_, DISTRHO_PLUGIN_AU_TYPE, _, DISTRHO_PLUGIN_AU_SUBTYPE, _, DISTRHO_PLUGIN_AU_MANUFACTURER) + MACRO_NAME(CocoaAUView_, DISTRHO_PLUGIN_AU_TYPE, _, DISTRHO_PLUGIN_UNIQUE_ID, _, DISTRHO_PLUGIN_BRAND_ID) @interface COCOA_UI_CLASS_NAME : NSObject<AUCocoaUIBase> { diff --git a/examples/CairoUI/CairoExamplePlugin.cpp b/examples/CairoUI/CairoExamplePlugin.cpp @@ -1,7 +1,7 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com> * Copyright (C) 2019-2021 Jean Pierre Cimalando <jp-dev@inbox.ru> + * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -75,15 +75,6 @@ public: } /** - Get the plugin unique Id.@n - This value is used by LADSPA, DSSI, VST2 and VST3 plugin formats. - */ - int64_t getUniqueId() const override - { - 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. */ diff --git a/examples/CairoUI/DistrhoPluginInfo.h b/examples/CairoUI/DistrhoPluginInfo.h @@ -40,20 +40,20 @@ #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/CairoUI" /** - The AudioUnit subtype for a plugin. - This is a 4-character symbol which identifies a plugin. - It must be unique within a manufacturer's plugins, but different manufacturers can use the same subtype. + The AudioUnit manufacturer for a plugin. + This is a 4-character symbol with at least one non-lower case character. + Plugins from the same brand/maker should use the same symbol. @note This macro is required when building AU plugins */ -#define DISTRHO_PLUGIN_AU_SUBTYPE cair +#define DISTRHO_PLUGIN_BRAND_ID Dstr /** - The AudioUnit manufacturer for a plugin. - This is a 4-character symbol with at least one non-lower case character. - Plugins from the same brand/maker should use the same symbol. + The AudioUnit subtype for a plugin. + This is a 4-character symbol which identifies a plugin. + It must be unique within a manufacturer's plugins, but different manufacturers can use the same subtype. @note This macro is required when building AU plugins */ -#define DISTRHO_PLUGIN_AU_MANUFACTURER Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID dCai /** The plugin id when exporting in CLAP format, in reverse URI form. diff --git a/examples/Info/DistrhoPluginInfo.h b/examples/Info/DistrhoPluginInfo.h @@ -22,8 +22,8 @@ #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/Info" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.info" -#define DISTRHO_PLUGIN_AU_SUBTYPE info -#define DISTRHO_PLUGIN_AU_MANUFACTURER Dstr +#define DISTRHO_PLUGIN_BRAND_ID Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID dNfo #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_IS_RT_SAFE 1 diff --git a/examples/Info/InfoExamplePlugin.cpp b/examples/Info/InfoExamplePlugin.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -91,15 +91,6 @@ protected: return d_version(1, 0, 0); } - /** - Get the plugin unique Id. - This value is used by LADSPA, DSSI and VST plugin formats. - */ - int64_t getUniqueId() const override - { - return d_cconst('d', 'N', 'f', 'o'); - } - /* -------------------------------------------------------------------------------------------------------- * Init */ diff --git a/examples/Meters/DistrhoPluginInfo.h b/examples/Meters/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -22,8 +22,8 @@ #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/Meters" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.meters" -#define DISTRHO_PLUGIN_AU_SUBTYPE mtrs -#define DISTRHO_PLUGIN_AU_MANUFACTURER Dstr +#define DISTRHO_PLUGIN_BRAND_ID Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID dMtr #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_IS_RT_SAFE 1 diff --git a/examples/Meters/ExamplePluginMeters.cpp b/examples/Meters/ExamplePluginMeters.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -89,15 +89,6 @@ protected: return d_version(1, 0, 0); } - /** - Get the plugin unique Id.@n - This value is used by LADSPA, DSSI, VST2 and VST3 plugin formats. - */ - int64_t getUniqueId() const override - { - return d_cconst('d', 'M', 't', 'r'); - } - /* -------------------------------------------------------------------------------------------------------- * Init */ diff --git a/examples/MidiThrough/DistrhoPluginInfo.h b/examples/MidiThrough/DistrhoPluginInfo.h @@ -22,8 +22,8 @@ #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/MidiThrough" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.midi-through" -#define DISTRHO_PLUGIN_AU_SUBTYPE midt -#define DISTRHO_PLUGIN_AU_MANUFACTURER Dstr +#define DISTRHO_PLUGIN_BRAND_ID Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID dMTr #define DISTRHO_PLUGIN_HAS_UI 0 #define DISTRHO_PLUGIN_IS_RT_SAFE 1 diff --git a/examples/MidiThrough/MidiThroughExamplePlugin.cpp b/examples/MidiThrough/MidiThroughExamplePlugin.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -83,15 +83,6 @@ protected: return d_version(1, 0, 0); } - /** - Get the plugin unique Id. - This value is used by LADSPA, DSSI and VST plugin formats. - */ - int64_t getUniqueId() const override - { - return d_cconst('d', 'M', 'T', 'r'); - } - /* -------------------------------------------------------------------------------------------------------- * Init and Internal data, unused in this plugin */ diff --git a/examples/Parameters/DistrhoPluginInfo.h b/examples/Parameters/DistrhoPluginInfo.h @@ -22,8 +22,8 @@ #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/Parameters" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.parameters" -#define DISTRHO_PLUGIN_AU_SUBTYPE parm -#define DISTRHO_PLUGIN_AU_MANUFACTURER Dstr +#define DISTRHO_PLUGIN_BRAND_ID Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID dPrm #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_IS_RT_SAFE 1 diff --git a/examples/Parameters/ExamplePluginParameters.cpp b/examples/Parameters/ExamplePluginParameters.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -92,15 +92,6 @@ The plugin will be treated as an effect, but it will not change the host audio." return d_version(1, 0, 0); } - /** - Get the plugin unique Id. - This value is used by LADSPA, DSSI and VST plugin formats. - */ - int64_t getUniqueId() const override - { - return d_cconst('d', 'P', 'r', 'm'); - } - /* -------------------------------------------------------------------------------------------------------- * Init */ diff --git a/examples/SendNote/DistrhoPluginInfo.h b/examples/SendNote/DistrhoPluginInfo.h @@ -22,8 +22,8 @@ #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/SendNote" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.send-note" -#define DISTRHO_PLUGIN_AU_SUBTYPE note -#define DISTRHO_PLUGIN_AU_MANUFACTURER Dstr +#define DISTRHO_PLUGIN_BRAND_ID Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID dSNo #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_HAS_EMBED_UI 1 diff --git a/examples/SendNote/SendNoteExamplePlugin.cpp b/examples/SendNote/SendNoteExamplePlugin.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2021 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -90,15 +90,6 @@ protected: return d_version(1, 0, 0); } - /** - Get the plugin unique Id. - This value is used by LADSPA, DSSI and VST plugin formats. - */ - int64_t getUniqueId() const override - { - return d_cconst('d', 'S', 'N', 'o'); - } - /* -------------------------------------------------------------------------------------------------------- * Init */ diff --git a/examples/States/DistrhoPluginInfo.h b/examples/States/DistrhoPluginInfo.h @@ -22,8 +22,8 @@ #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/States" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.states" -#define DISTRHO_PLUGIN_AU_SUBTYPE stat -#define DISTRHO_PLUGIN_AU_MANUFACTURER Dstr +#define DISTRHO_PLUGIN_BRAND_ID Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID dSts #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_IS_RT_SAFE 1 diff --git a/examples/States/ExamplePluginStates.cpp b/examples/States/ExamplePluginStates.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -92,15 +92,6 @@ The plugin will be treated as an effect, but it will not change the host audio." return d_version(1, 0, 0); } - /** - Get the plugin unique Id. - This value is used by LADSPA, DSSI and VST plugin formats. - */ - int64_t getUniqueId() const override - { - return d_cconst('d', 'S', 't', 's'); - } - /* -------------------------------------------------------------------------------------------------------- * Init */