[SCM] calf/master: + LADSPA: make plugin IDs unique across Calf plugins, add an install-time check
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:39:52 UTC 2013
The following commit has been merged in the master branch:
commit 43dafcc7cd3bc4474dcb1f542e413ff9ef1fc9b4
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Wed Nov 18 22:16:56 2009 +0000
+ LADSPA: make plugin IDs unique across Calf plugins, add an install-time check
diff --git a/src/makerdf.cpp b/src/makerdf.cpp
index d3723c6..e239850 100644
--- a/src/makerdf.cpp
+++ b/src/makerdf.cpp
@@ -17,6 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
+#include <assert.h>
#include <getopt.h>
#include <stdint.h>
#include <stdlib.h>
@@ -29,6 +30,7 @@
#include <calf/lv2_event.h>
#include <calf/lv2_uri_map.h>
#endif
+#include <set>
using namespace std;
using namespace calf_utils;
@@ -131,11 +133,21 @@ void make_rdf()
vector<calf_plugins::plugin_metadata_iface *> plugins;
calf_plugins::get_all_plugins(plugins);
+ set<int> used_ids;
for (unsigned int i = 0; i < plugins.size(); i++)
{
plugin_metadata_iface *p = plugins[i];
+ const ladspa_plugin_info &info = p->get_plugin_info();
+
+ if(used_ids.count(info.unique_id))
+ {
+ fprintf(stderr, "ERROR: Duplicate ID %d in plugin %s\n", info.unique_id, info.name);
+ assert(0);
+ }
+ used_ids.insert(info.unique_id);
+
if (!p->requires_midi()) {
- rdf += generate_ladspa_rdf(p->get_plugin_info(), p->get_param_props(0), p->get_port_names(), p->get_param_count(), p->get_param_port_offset());
+ rdf += generate_ladspa_rdf(info, p->get_param_props(0), p->get_port_names(), p->get_param_count(), p->get_param_port_offset());
}
delete p;
}
diff --git a/src/modules.cpp b/src/modules.cpp
index abc024f..9f82d1b 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -282,7 +282,7 @@ CALF_PORT_PROPS(sidechaincompressor) = {
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "f2_active", "F2 Active" },
};
-CALF_PLUGIN_INFO(sidechaincompressor) = { 0x8502, "Sidechaincompressor", "Calf Sidechain Compressor", "Markus Schmidt / Thor Harald Johansen", calf_plugins::calf_copyright_info, "CompressorPlugin" };
+CALF_PLUGIN_INFO(sidechaincompressor) = { 0x8517, "Sidechaincompressor", "Calf Sidechain Compressor", "Markus Schmidt / Thor Harald Johansen", calf_plugins::calf_copyright_info, "CompressorPlugin" };
////////////////////////////////////////////////////////////////////////////
@@ -368,7 +368,7 @@ CALF_PORT_PROPS(multibandcompressor) = {
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "mute3", "Mute 4" },
};
-CALF_PLUGIN_INFO(multibandcompressor) = { 0x8502, "Multibandcompressor", "Calf Multiband Compressor", "Markus Schmidt / Thor Harald Johansen", calf_plugins::calf_copyright_info, "CompressorPlugin" };
+CALF_PLUGIN_INFO(multibandcompressor) = { 0x8516, "Multibandcompressor", "Calf Multiband Compressor", "Markus Schmidt / Thor Harald Johansen", calf_plugins::calf_copyright_info, "CompressorPlugin" };
////////////////////////////////////////////////////////////////////////////
@@ -399,7 +399,7 @@ CALF_PORT_PROPS(deesser) = {
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "sc_listen", "S/C-Listen" },
};
-CALF_PLUGIN_INFO(deesser) = { 0x8502, "Deesser", "Calf Deesser", "Markus Schmidt / Thor Harald Johansen", calf_plugins::calf_copyright_info, "CompressorPlugin" };
+CALF_PLUGIN_INFO(deesser) = { 0x8515, "Deesser", "Calf Deesser", "Markus Schmidt / Thor Harald Johansen", calf_plugins::calf_copyright_info, "CompressorPlugin" };
////////////////////////////////////////////////////////////////////////////
// A few macros to make
@@ -454,7 +454,7 @@ CALF_PORT_PROPS(equalizer5band) = {
EQ_BAND_PARAMS(3, 2500)
};
-CALF_PLUGIN_INFO(equalizer5band) = { 0x8501, "Equalizer5Band", "Calf Equalizer 5 Band", "Markus Schmidt", calf_plugins::calf_copyright_info, "EqualizerPlugin" };
+CALF_PLUGIN_INFO(equalizer5band) = { 0x8511, "Equalizer5Band", "Calf Equalizer 5 Band", "Markus Schmidt", calf_plugins::calf_copyright_info, "EqualizerPlugin" };
//////////////////////////////////////////////////////////////////////////////
@@ -473,7 +473,7 @@ CALF_PORT_PROPS(equalizer8band) = {
EQ_BAND_PARAMS(4, 5000)
};
-CALF_PLUGIN_INFO(equalizer8band) = { 0x8501, "Equalizer8Band", "Calf Equalizer 8 Band", "Markus Schmidt", calf_plugins::calf_copyright_info, "EqualizerPlugin" };
+CALF_PLUGIN_INFO(equalizer8band) = { 0x8512, "Equalizer8Band", "Calf Equalizer 8 Band", "Markus Schmidt", calf_plugins::calf_copyright_info, "EqualizerPlugin" };
////////////////////////////////////////////////////////////////////////////
@@ -494,7 +494,7 @@ CALF_PORT_PROPS(equalizer12band) = {
EQ_BAND_PARAMS(8, 6000)
};
-CALF_PLUGIN_INFO(equalizer12band) = { 0x8501, "Equalizer12Band", "Calf Equalizer 12 Band", "Markus Schmidt", calf_plugins::calf_copyright_info, "EqualizerPlugin" };
+CALF_PLUGIN_INFO(equalizer12band) = { 0x8513, "Equalizer12Band", "Calf Equalizer 12 Band", "Markus Schmidt", calf_plugins::calf_copyright_info, "EqualizerPlugin" };
////////////////////////////////////////////////////////////////////////////
@@ -512,7 +512,7 @@ CALF_PORT_PROPS(pulsator) = {
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "mono", "Mono-in" },
};
-CALF_PLUGIN_INFO(pulsator) = { 0x8502, "Pulsator", "Calf Pulsator", "Markus Schmidt", calf_plugins::calf_copyright_info, "ModulationPlugin" };
+CALF_PLUGIN_INFO(pulsator) = { 0x8514, "Pulsator", "Calf Pulsator", "Markus Schmidt", calf_plugins::calf_copyright_info, "ModulationPlugin" };
////////////////////////////////////////////////////////////////////////////
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list