summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Patch.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-08 06:04:32 +0000
committerDavid Robillard <d@drobilla.net>2007-04-08 06:04:32 +0000
commite96c36c1a7abb062e36efc0ac95c35fedcef922e (patch)
tree826d5caa0392201472d12c02a1c3df4cf7b275be /src/libs/engine/Patch.cpp
parent7d69e89f22304e37fa325ce4f39a374a02072a69 (diff)
downloadingen-e96c36c1a7abb062e36efc0ac95c35fedcef922e.tar.gz
ingen-e96c36c1a7abb062e36efc0ac95c35fedcef922e.tar.bz2
ingen-e96c36c1a7abb062e36efc0ac95c35fedcef922e.zip
De-template-ification of port types (req. for LV2 MIDI, but nice code size reduction).
LV2 MIDI patching support (LV2 style MIDI throughout, inc. internal plugins). git-svn-id: http://svn.drobilla.net/lad/ingen@415 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Patch.cpp')
-rw-r--r--src/libs/engine/Patch.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libs/engine/Patch.cpp b/src/libs/engine/Patch.cpp
index 9b32b74a..a2b5a85f 100644
--- a/src/libs/engine/Patch.cpp
+++ b/src/libs/engine/Patch.cpp
@@ -271,13 +271,7 @@ Patch::create_port(const string& name, DataType type, size_t buffer_size, bool i
assert( !(type == DataType::UNKNOWN) );
- // FIXME: is it possible to just "pass" the type directly as the template parameter somehow?
- if (type == DataType::FLOAT)
- return new DuplexPort<Sample>(this, name, 0, _poly, type, buffer_size, is_output);
- else if (type == DataType::MIDI)
- return new DuplexPort<MidiMessage>(this, name, 0, _poly, type, buffer_size, is_output);
- else
- return NULL;
+ return new DuplexPort(this, name, 0, _poly, type, buffer_size, is_output);
}