summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-07-28 23:38:03 +0000
committerDavid Robillard <d@drobilla.net>2008-07-28 23:38:03 +0000
commit2811066546dfe0bd9349502572ee3b35c2532bad (patch)
treed6ec436efe0d51185fc5e46103f8f8575319d46c /src/libs/engine
parented9e1aa15e5a9363653b46e12313878f82652393 (diff)
downloadingen-2811066546dfe0bd9349502572ee3b35c2532bad.tar.gz
ingen-2811066546dfe0bd9349502572ee3b35c2532bad.tar.bz2
ingen-2811066546dfe0bd9349502572ee3b35c2532bad.zip
Compatibility hacks for old Om patchages (many Smack patches now load successfully).
git-svn-id: http://svn.drobilla.net/lad/ingen@1299 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/LADSPANode.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/libs/engine/LADSPANode.cpp b/src/libs/engine/LADSPANode.cpp
index dd3ce0c2..ef4b0ece 100644
--- a/src/libs/engine/LADSPANode.cpp
+++ b/src/libs/engine/LADSPANode.cpp
@@ -104,6 +104,22 @@ LADSPANode::apply_poly(Raul::Maid& maid, uint32_t poly)
return true;
}
+
+static string
+nameify_if_invalid(const string& name)
+{
+ if (Path::is_valid_name(name)) {
+ return name;
+ } else {
+ const string new_name = Path::nameify(name);
+ assert(Path::is_valid_name(new_name));
+ if (new_name != name)
+ cerr << "WARNING: Illegal LADSPA port name '"
+ << name << "' converted to '" << new_name << "'" << endl;
+ return new_name;
+ }
+}
+
/** Instantiate self from LADSPA plugin descriptor.
*
@@ -137,7 +153,7 @@ LADSPANode::instantiate()
PortImpl* port = NULL;
for (size_t j=0; j < _descriptor->PortCount; ++j) {
- port_name = Path::nameify(_descriptor->PortNames[j]);
+ port_name = nameify_if_invalid(_descriptor->PortNames[j]);
string::size_type slash_index;