aboutsummaryrefslogtreecommitdiffstats
path: root/lvz/gendata.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-09 04:33:55 +0000
committerDavid Robillard <d@drobilla.net>2008-08-09 04:33:55 +0000
commitf652720d0dc24a1951e66e28486e856b424d68df (patch)
tree2c4c0c6aa6d62a1e82dded86c5d52a179b56e766 /lvz/gendata.cpp
parent40d6f1f30e067af50e6fd9546f04533463dfea2a (diff)
downloadmda.lv2-f652720d0dc24a1951e66e28486e856b424d68df.tar.gz
mda.lv2-f652720d0dc24a1951e66e28486e856b424d68df.tar.bz2
mda.lv2-f652720d0dc24a1951e66e28486e856b424d68df.zip
Fix bugs.
Tighten up code. Crank up warnings to absurdly strict and pedantic level in order to figure out WTF is going on with audio. git-svn-id: http://svn.drobilla.net/lad/mda-lv2@1328 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'lvz/gendata.cpp')
-rw-r--r--lvz/gendata.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lvz/gendata.cpp b/lvz/gendata.cpp
index 7efd739..7f1d501 100644
--- a/lvz/gendata.cpp
+++ b/lvz/gendata.cpp
@@ -30,7 +30,7 @@ using namespace std;
// VST is so incredibly awful. Just.. wow.
#define MAX_NAME_LENGTH 1024
-char name[MAX_NAME_LENGTH];
+char name_buf[MAX_NAME_LENGTH];
struct Record {
@@ -89,13 +89,13 @@ write_plugin(AudioEffectX* effect, const string& lib_file_name)
string data_file_name = base_name + ".ttl";
fstream os(data_file_name.c_str(), ios::out);
- effect->getProductString(name);
+ effect->getProductString(name_buf);
os << "@prefix : <http://lv2plug.in/ns/lv2core#> ." << endl;
os << "@prefix doap: <http://usefulinc.com/ns/doap#> ." << endl << endl;
os << "<" << effect->getURI() << ">" << endl;
os << "\t:symbol \"" << effect->getUniqueID() << "\" ;" << endl;
- os << "\tdoap:name \"" << name << "\" ;" << endl;
+ os << "\tdoap:name \"" << name_buf << "\" ;" << endl;
os << "\tdoap:license <http://usefulinc.com/doap/licenses/gpl> ;" << endl;
os << "\t:pluginProperty :hardRtCapable";
@@ -112,11 +112,11 @@ write_plugin(AudioEffectX* effect, const string& lib_file_name)
uint32_t idx = 0;
for (uint32_t i = idx; i < num_params; ++i, ++idx) {
- effect->getParameterName(i, name);
+ effect->getParameterName(i, name_buf);
os << "\t\ta :InputPort, :ControlPort ;" << endl;
os << "\t\t:index" << " " << idx << " ;" << endl;
- os << "\t\t:name \"" << name << "\" ;" << endl;
- os << "\t\t:symbol \"" << symbolify(name) << "\" ;" << endl;
+ os << "\t\t:name \"" << name_buf << "\" ;" << endl;
+ os << "\t\t:symbol \"" << symbolify(name_buf) << "\" ;" << endl;
os << "\t\t:default " << effect->getParameter(i) << " ;" << endl;
os << "\t\t:minimum 0.0 ;" << endl;
os << "\t\t:maximum 1.0 ;" << endl;
@@ -124,7 +124,6 @@ write_plugin(AudioEffectX* effect, const string& lib_file_name)
}
for (uint32_t i = 0; i < num_audio_ins; ++i, ++idx) {
- snprintf(name, MAX_NAME_LENGTH, "\"in%d\"", i);
os << "\t\ta :InputPort, :AudioPort ;" << endl;
os << "\t\t:index" << " " << idx << " ;" << endl;
os << "\t\t:symbol \"in" << i+1 << "\" ;" << endl;
@@ -133,7 +132,6 @@ write_plugin(AudioEffectX* effect, const string& lib_file_name)
}
for (uint32_t i = 0; i < num_audio_outs; ++i, ++idx) {
- snprintf(name, MAX_NAME_LENGTH, "\"out%d\"", i);
os << "\t\ta :OutputPort, :AudioPort ;" << endl;
os << "\t\t:index " << idx << " ;" << endl;
os << "\t\t:symbol \"out" << i+1 << "\" ;" << endl;