summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-30 17:36:38 +0000
committerDavid Robillard <d@drobilla.net>2007-09-30 17:36:38 +0000
commitc40ddfc0eebbcb3333d6cc9e3df7fb62ecb45941 (patch)
tree6e73d5d43284335031cee32f9225b698f315a59d /src/libs/engine/events
parent829075dff9fe5d0b3f243f9e40256563a5f8e09a (diff)
downloadingen-c40ddfc0eebbcb3333d6cc9e3df7fb62ecb45941.tar.gz
ingen-c40ddfc0eebbcb3333d6cc9e3df7fb62ecb45941.tar.bz2
ingen-c40ddfc0eebbcb3333d6cc9e3df7fb62ecb45941.zip
Better driver interface for input/output.
MIDI output (pass-through anyway, plugin->output is still screwy). Fix crash on failure to instantiate LV2 plugin. git-svn-id: http://svn.drobilla.net/lad/ingen@786 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/AddPortEvent.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp
index 28273815..d31c2169 100644
--- a/src/libs/engine/events/AddPortEvent.cpp
+++ b/src/libs/engine/events/AddPortEvent.cpp
@@ -115,15 +115,13 @@ AddPortEvent::pre_process()
if (!_patch->parent()) {
if (_type == "ingen:audio")
_driver_port = _engine.audio_driver()->create_port(
- dynamic_cast<DuplexPort*>(_patch_port));
+ dynamic_cast<DuplexPort*>(_patch_port));
else if (_type == "ingen:midi")
_driver_port = _engine.midi_driver()->create_port(
- dynamic_cast<DuplexPort*>(_patch_port));
- }
-
- if (_type == "ingen:osc" && _engine.osc_driver()) {
- _driver_port = _engine.osc_driver()->create_port(
- dynamic_cast<DuplexPort*>(_patch_port));
+ dynamic_cast<DuplexPort*>(_patch_port));
+ else if (_type == "ingen:osc" && _engine.osc_driver())
+ _driver_port = _engine.osc_driver()->create_port(
+ dynamic_cast<DuplexPort*>(_patch_port));
}
assert(_ports_array->size() == _patch->num_ports());