From f652720d0dc24a1951e66e28486e856b424d68df Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 9 Aug 2008 04:33:55 +0000 Subject: 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 --- lvz/gendata.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lvz/gendata.cpp') 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 : ." << endl; os << "@prefix 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 ;" << 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; -- cgit v1.2.1