summaryrefslogtreecommitdiffstats
path: root/src/JackDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-15 00:23:38 +0000
committerDavid Robillard <d@drobilla.net>2010-12-15 00:23:38 +0000
commitba2863f012866398efab12b6b3e6a113d5eb60bd (patch)
treed6eeb5c5e009bc3f42bd354afa25cfa684ed212d /src/JackDriver.cpp
parentfb6cff045de58c304527efea4e85d53fd80d2758 (diff)
downloadpatchage-ba2863f012866398efab12b6b3e6a113d5eb60bd.tar.gz
patchage-ba2863f012866398efab12b6b3e6a113d5eb60bd.tar.bz2
patchage-ba2863f012866398efab12b6b3e6a113d5eb60bd.zip
Fix removal of ALSA duplex ports (remove both corresponding canvas ports).
Use simpler (and seemingly less lockup prone) blocking ALSA sequencer event API. Only use a ringbuffer for JACK driver. Reduce memory usage. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2690 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/JackDriver.cpp')
-rw-r--r--src/JackDriver.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp
index 0ebdb98..7bdcb72 100644
--- a/src/JackDriver.cpp
+++ b/src/JackDriver.cpp
@@ -36,9 +36,9 @@ using namespace FlowCanvas;
JackDriver::JackDriver(Patchage* app)
- : Driver(128)
- , _app(app)
+ : _app(app)
, _client(NULL)
+ , _events(128)
, _is_activated(false)
, _xruns(0)
, _xrun_delay(0)
@@ -611,3 +611,15 @@ JackDriver::reset_max_dsp_load()
jack_reset_max_delayed_usecs(_client);
}
+
+void
+JackDriver::process_events(Patchage* app)
+{
+ while (!_events.empty()) {
+ PatchageEvent& ev = _events.front();
+ ev.execute(app);
+ _events.pop();
+ }
+}
+
+