summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@falktx.com>2022-09-10 21:41:43 +0100
committerfalkTX <falktx@falktx.com>2022-09-10 21:41:43 +0100
commit93ce2476d997f524cd2c2e749f7e672905d126b6 (patch)
tree5004d2b85315fac381c1383cf6a46d85eff646bb
parente735e7efdcd2ee1d1c3e91db845c56581cc9d241 (diff)
Define and use new DISTRHO_PLUGIN_CLAP_ID macro
Signed-off-by: falkTX <falktx@falktx.com>
-rw-r--r--distrho/DistrhoInfo.hpp8
-rw-r--r--distrho/src/DistrhoPluginCLAP.cpp6
-rw-r--r--examples/Info/DistrhoPluginInfo.h9
-rw-r--r--examples/Meters/DistrhoPluginInfo.h9
-rw-r--r--examples/MidiThrough/DistrhoPluginInfo.h9
-rw-r--r--examples/Parameters/DistrhoPluginInfo.h9
-rw-r--r--examples/SendNote/DistrhoPluginInfo.h7
-rw-r--r--examples/States/DistrhoPluginInfo.h9
8 files changed, 42 insertions, 24 deletions
diff --git a/distrho/DistrhoInfo.hpp b/distrho/DistrhoInfo.hpp
index 8f638092..e954d393 100644
--- 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
index 6dfd231d..71a9c395 100644
--- 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
index 6a1096b1..0305639b 100644
--- 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
index 7f5431f9..46c9b42f 100644
--- 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
index 5ba03b30..67c433c2 100644
--- 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
index 649ab70a..b9b50d97 100644
--- 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
index 10a7a29a..ddb9018d 100644
--- 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
index 6b8123d5..37b01840 100644
--- 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