DPF

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

commit 93ce2476d997f524cd2c2e749f7e672905d126b6
parent e735e7efdcd2ee1d1c3e91db845c56581cc9d241
Author: falkTX <falktx@falktx.com>
Date:   Sat, 10 Sep 2022 21:41:16 +0100

Define and use new DISTRHO_PLUGIN_CLAP_ID macro

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

Diffstat:
Mdistrho/DistrhoInfo.hpp | 8++++++++
Mdistrho/src/DistrhoPluginCLAP.cpp | 6+++++-
Mexamples/Info/DistrhoPluginInfo.h | 9+++++----
Mexamples/Meters/DistrhoPluginInfo.h | 9+++++----
Mexamples/MidiThrough/DistrhoPluginInfo.h | 9+++++----
Mexamples/Parameters/DistrhoPluginInfo.h | 9+++++----
Mexamples/SendNote/DistrhoPluginInfo.h | 7++++---
Mexamples/States/DistrhoPluginInfo.h | 9+++++----
8 files changed, 42 insertions(+), 24 deletions(-)

diff --git a/distrho/DistrhoInfo.hpp b/distrho/DistrhoInfo.hpp @@ -475,6 +475,8 @@ START_NAMESPACE_DISTRHO - @ref DISTRHO_PLUGIN_NUM_INPUTS - @ref DISTRHO_PLUGIN_NUM_OUTPUTS - @ref DISTRHO_PLUGIN_URI + + Additionally, @ref DISTRHO_PLUGIN_CLAP_ID is required if building CLAP plugins. @{ */ @@ -814,6 +816,12 @@ START_NAMESPACE_DISTRHO */ #define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "stereo" +/** + The plugin id when exporting in CLAP format, in reverse URI form. + @note This macro is required when building CLAP plugins +*/ +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.effect" + /** @} */ /* ------------------------------------------------------------------------------------------------------------ diff --git a/distrho/src/DistrhoPluginCLAP.cpp b/distrho/src/DistrhoPluginCLAP.cpp @@ -17,6 +17,10 @@ #include "DistrhoPluginInternal.hpp" #include "extra/ScopedPointer.hpp" +#ifndef DISTRHO_PLUGIN_CLAP_ID +# error DISTRHO_PLUGIN_CLAP_ID undefined! +#endif + #if DISTRHO_PLUGIN_HAS_UI && ! defined(HAVE_DGL) && ! DISTRHO_PLUGIN_HAS_EXTERNAL_UI # undef DISTRHO_PLUGIN_HAS_UI # define DISTRHO_PLUGIN_HAS_UI 0 @@ -2032,7 +2036,7 @@ static const clap_plugin_descriptor_t* clap_get_plugin_descriptor(const clap_plu static const clap_plugin_descriptor_t descriptor = { CLAP_VERSION, - sPlugin->getLabel(), + DISTRHO_PLUGIN_CLAP_ID, sPlugin->getName(), sPlugin->getMaker(), // TODO url diff --git a/examples/Info/DistrhoPluginInfo.h b/examples/Info/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2021 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2022 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 @@ -17,9 +17,10 @@ #ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED #define DISTRHO_PLUGIN_INFO_H_INCLUDED -#define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_NAME "Info" -#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/Info" +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_NAME "Info" +#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/Info" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.info" #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_IS_RT_SAFE 1 diff --git a/examples/Meters/DistrhoPluginInfo.h b/examples/Meters/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2022 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 @@ -17,9 +17,10 @@ #ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED #define DISTRHO_PLUGIN_INFO_H_INCLUDED -#define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_NAME "Meters" -#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/Meters" +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_NAME "Meters" +#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/Meters" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.meters" #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_IS_RT_SAFE 1 diff --git a/examples/MidiThrough/DistrhoPluginInfo.h b/examples/MidiThrough/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2022 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 @@ -17,9 +17,10 @@ #ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED #define DISTRHO_PLUGIN_INFO_H_INCLUDED -#define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_NAME "MidiThrough" -#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/MidiThrough" +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_NAME "MidiThrough" +#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/MidiThrough" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.midi-through" #define DISTRHO_PLUGIN_HAS_UI 0 #define DISTRHO_PLUGIN_IS_RT_SAFE 1 diff --git a/examples/Parameters/DistrhoPluginInfo.h b/examples/Parameters/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2022 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 @@ -17,9 +17,10 @@ #ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED #define DISTRHO_PLUGIN_INFO_H_INCLUDED -#define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_NAME "Parameters" -#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/Parameters" +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_NAME "Parameters" +#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/Parameters" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.parameters" #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_IS_RT_SAFE 1 diff --git a/examples/SendNote/DistrhoPluginInfo.h b/examples/SendNote/DistrhoPluginInfo.h @@ -17,9 +17,10 @@ #ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED #define DISTRHO_PLUGIN_INFO_H_INCLUDED -#define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_NAME "SendNote" -#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/SendNote" +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_NAME "SendNote" +#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/SendNote" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.send-note" #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_HAS_EMBED_UI 1 diff --git a/examples/States/DistrhoPluginInfo.h b/examples/States/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com> + * Copyright (C) 2012-2022 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 @@ -17,9 +17,10 @@ #ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED #define DISTRHO_PLUGIN_INFO_H_INCLUDED -#define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_NAME "States" -#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/States" +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_NAME "States" +#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/States" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.states" #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_IS_RT_SAFE 1