summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-01-07 17:51:18 +0000
committerDavid Robillard <d@drobilla.net>2007-01-07 17:51:18 +0000
commit813e0cbb39809d7cf837e6b91a75815079502f47 (patch)
tree7a01ea7c6f3959ba6c6f1ffeffa27919ddc04ba1 /src/libs/engine/events
parent99ab1c257b7456c16f82119e1faea62c61eea660 (diff)
downloadingen-813e0cbb39809d7cf837e6b91a75815079502f47.tar.gz
ingen-813e0cbb39809d7cf837e6b91a75815079502f47.tar.bz2
ingen-813e0cbb39809d7cf837e6b91a75815079502f47.zip
Jack MIDI port destruction.
git-svn-id: http://svn.drobilla.net/lad/ingen@240 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/AddPortEvent.cpp5
-rw-r--r--src/libs/engine/events/DestroyEvent.cpp7
2 files changed, 9 insertions, 3 deletions
diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp
index 4173ced2..317e68b7 100644
--- a/src/libs/engine/events/AddPortEvent.cpp
+++ b/src/libs/engine/events/AddPortEvent.cpp
@@ -140,7 +140,10 @@ AddPortEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
}
if (_driver_port)
- _engine.audio_driver()->add_port(_driver_port);
+ if (_type == "ingen:audio")
+ _engine.audio_driver()->add_port(_driver_port);
+ else if (_type == "ingen:midi")
+ _engine.midi_driver()->add_port(_driver_port);
}
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp
index 9866fe95..97a4f215 100644
--- a/src/libs/engine/events/DestroyEvent.cpp
+++ b/src/libs/engine/events/DestroyEvent.cpp
@@ -22,6 +22,7 @@
#include "Node.h"
#include "Plugin.h"
#include "AudioDriver.h"
+#include "MidiDriver.h"
#include "InternalNode.h"
#include "DisconnectNodeEvent.h"
#include "DisconnectPortEvent.h"
@@ -178,9 +179,11 @@ DestroyEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
_port->parent_patch()->external_ports(_ports_array);
- if (!_port->parent_patch()->parent())
+ if (!_port->parent_patch()->parent()) {
_driver_port = _engine.audio_driver()->remove_port(_port->path());
-
+ if (!_driver_port)
+ _driver_port = _engine.midi_driver()->remove_port(_port->path());
+ }
}
}