[SCM] calf/master: + Monosynth: waves are not generated into uninitialized structures (thanks larsl!) + LADSPA: fixed a bug that caused compile error when LADSPA is not present, fixed LRDF generation (works correctly in Ardour now)
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:37:09 UTC 2013
The following commit has been merged in the master branch:
commit 7451b3ffad88831c7d6be1a8ada230882d84aacd
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date: Sat Apr 12 17:44:30 2008 +0000
+ Monosynth: waves are not generated into uninitialized structures (thanks larsl!)
+ LADSPA: fixed a bug that caused compile error when LADSPA is not present, fixed LRDF generation (works correctly in Ardour now)
git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@157 78b06b96-2940-0410-b7fc-879d825d01d8
diff --git a/src/calf/modules_synths.h b/src/calf/modules_synths.h
index 4a1a474..e5ed150 100644
--- a/src/calf/modules_synths.h
+++ b/src/calf/modules_synths.h
@@ -48,7 +48,7 @@ public:
float *outs[out_count];
float *params[param_count];
uint32_t srate, crate;
- static waveform_family<MONOSYNTH_WAVE_BITS> waves[wave_count];
+ static waveform_family<MONOSYNTH_WAVE_BITS> *waves;
waveform_oscillator<MONOSYNTH_WAVE_BITS> osc1, osc2;
bool running, stopping, gate;
int last_key;
diff --git a/src/giface.cpp b/src/giface.cpp
index 9d6e55d..928d6d3 100644
--- a/src/giface.cpp
+++ b/src/giface.cpp
@@ -247,7 +247,7 @@ std::string synth::generate_ladspa_rdf(const ladspa_info &info, parameter_proper
for (unsigned int i = 0; i < count; i++) {
rdf +=
" <ladspa:hasPort>\n"
- " <ladspa:InputControlPort rdf:about=\"" + plugin_id + "."+i2s(i)+"\" "
+ " <ladspa:InputControlPort rdf:about=\"" + plugin_id + "."+i2s(ctl_ofs + i)+"\" "
+ unit_to_string(params[i]) +
"ladspa:hasLabel=\"" + params[i].short_name + "\" "
+ scale_to_string(params[i]) +
@@ -260,7 +260,7 @@ std::string synth::generate_ladspa_rdf(const ladspa_info &info, parameter_proper
rdf +=
" <ladspa:hasPortValue>\n"
" <ladspa:PortValue rdf:value=\"" + f2s(params[i].def_value) + "\">\n"
- " <ladspa:forPort rdf:resource=\"" + plugin_id + "." + i2s(i ) + "\"/>\n"
+ " <ladspa:forPort rdf:resource=\"" + plugin_id + "." + i2s(ctl_ofs + i) + "\"/>\n"
" </ladspa:PortValue>\n"
" </ladspa:hasPortValue>\n";
}
diff --git a/src/makerdf.cpp b/src/makerdf.cpp
index f0adcda..38cbccb 100644
--- a/src/makerdf.cpp
+++ b/src/makerdf.cpp
@@ -37,6 +37,7 @@ static struct option long_options[] = {
{0,0,0,0},
};
+#if USE_LADSPA
void make_rdf()
{
string rdf;
@@ -57,6 +58,7 @@ void make_rdf()
printf("%s\n", rdf.c_str());
}
+#endif
#if USE_LV2
static void add_port(string &ports, const char *symbol, const char *name, const char *direction, int pidx, const char *type = "lv2:AudioPort", bool optional = false)
@@ -262,11 +264,23 @@ int main(int argc, char *argv[])
break;
}
}
- if (mode == "rdf")
+ if (false)
+ {
+ }
+#if USE_LADSPA
+ else if (mode == "rdf")
make_rdf();
- if (mode == "ttl")
+#endif
+#if USE_LV2
+ else if (mode == "ttl")
make_ttl(path_prefix);
- if (mode == "manifest")
+ else if (mode == "manifest")
make_manifest();
+#endif
+ else
+ {
+ fprintf(stderr, "calfmakerdf: Mode %s unsupported in this version\n", optarg);
+ return 1;
+ }
return 0;
}
diff --git a/src/modules.cpp b/src/modules.cpp
index ee6893a..eec35a7 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -261,9 +261,13 @@ std::string synth::get_builtin_modules_rdf()
rdf += ::ladspa_filter.generate_rdf();
rdf += ::ladspa_vintage_delay.generate_rdf();
rdf += ::ladspa_monosynth.generate_rdf();
+ rdf += ::ladspa_organ.generate_rdf();
+ rdf += ::ladspa_rotary_speaker.generate_rdf();
+ rdf += ::ladspa_phaser.generate_rdf();
return rdf;
}
+
#endif
template<class Module>
diff --git a/src/monosynth.cpp b/src/monosynth.cpp
index d094e28..945c581 100644
--- a/src/monosynth.cpp
+++ b/src/monosynth.cpp
@@ -239,15 +239,20 @@ void monosynth_audio_module::activate() {
stack.clear();
}
-waveform_family<MONOSYNTH_WAVE_BITS> monosynth_audio_module::waves[wave_count];
+waveform_family<MONOSYNTH_WAVE_BITS> *monosynth_audio_module::waves;
void monosynth_audio_module::generate_waves()
{
float data[1 << MONOSYNTH_WAVE_BITS];
bandlimiter<MONOSYNTH_WAVE_BITS> bl;
+ if (waves)
+ return;
+
+ waves = new waveform_family<MONOSYNTH_WAVE_BITS>[wave_count];
enum { S = 1 << MONOSYNTH_WAVE_BITS, HS = S / 2, QS = S / 4, QS3 = 3 * QS };
float iQS = 1.0 / QS;
+
// yes these waves don't have really perfect 1/x spectrum because of aliasing
// (so what?)
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list