summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-27 23:47:42 +0000
committerDavid Robillard <d@drobilla.net>2008-11-27 23:47:42 +0000
commit32a6198748b61d6d7a6b4246e156f5a8516a2abd (patch)
tree982dce98b74f511624348e3b90e5a713ca36ce76 /src
parente45cd9710c4906781f326ca51fd068826697a4ed (diff)
downloadingen-32a6198748b61d6d7a6b4246e156f5a8516a2abd.tar.gz
ingen-32a6198748b61d6d7a6b4246e156f5a8516a2abd.tar.bz2
ingen-32a6198748b61d6d7a6b4246e156f5a8516a2abd.zip
Fix Om patch loading when plugins have names clashing with internal names.
Smack 808, 909, and fm kits all load correctly now. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1809 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/client/DeprecatedLoader.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/client/DeprecatedLoader.cpp b/src/client/DeprecatedLoader.cpp
index a93fd96d..7dcd3853 100644
--- a/src/client/DeprecatedLoader.cpp
+++ b/src/client/DeprecatedLoader.cpp
@@ -125,9 +125,7 @@ DeprecatedLoader::translate_load_path(const string& path)
assert(Path::is_valid((*t).second));
return (*t).second;
// Filthy, filthy kludges
- // (FIXME: apply these less heavy handedly, only when it's an internal module)
- } else /* if (path.find("midi") != string::npos) {
- assert(Path::is_valid(path));*/
+ } else if (path.find("midi_") != string::npos) {
if (path.substr(path.find_last_of("/")) == "/MIDI_In")
return path.substr(0, path.find_last_of("/")) + "/input";
else if (path.substr(path.find_last_of("/")) == "/Note_Number")
@@ -140,9 +138,9 @@ DeprecatedLoader::translate_load_path(const string& path)
return path.substr(0, path.find_last_of("/")) + "/velocity";
else
return path;
- /*} else {
+ } else {
return path;
- }*/
+ }
}
@@ -469,10 +467,10 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
_engine->new_port(path, "lv2:ControlPort", 0, true);
is_port = true;
} else if (plugin_label == "midi_input") {
- _engine->new_port(path, "ingen:EventPort", 0, false);
+ _engine->new_port(path, "lv2ev:EventPort", 0, false);
is_port = true;
} else if (plugin_label == "midi_output" ) {
- _engine->new_port(path, "ingen:EventPort", 0, true);
+ _engine->new_port(path, "lv2ev:EventPort", 0, true);
is_port = true;
} else {
cerr << "WARNING: Unknown internal plugin label \"" << plugin_label << "\"" << endl;
@@ -501,7 +499,7 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
return SharedPtr<NodeModel>();
} else {
- if (plugin_label == "note_in") {
+ if (plugin_label == "note_in") {
plugin_uri = NS_INGEN "note_node";
} else if (plugin_label == "control_input") {
plugin_uri = NS_INGEN "control_node";
@@ -617,7 +615,7 @@ DeprecatedLoader::load_connection(const Path& parent, xmlDocPtr doc, const xmlNo
source_port = nameify_if_invalid(source_port);
dest_node = nameify_if_invalid(dest_node);
dest_port = nameify_if_invalid(dest_port);
-
+
_engine->connect(
translate_load_path(parent.base() + source_node +"/"+ source_port),
translate_load_path(parent.base() + dest_node +"/"+ dest_port));