summaryrefslogtreecommitdiffstats
path: root/hosts
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-08 20:14:34 +0000
committerDavid Robillard <d@drobilla.net>2007-04-08 20:14:34 +0000
commitd33da68e658d171540ceec8f89464783e50267a6 (patch)
tree829c1e570ae96714bc8bdb5de85df869bbfb686f /hosts
parentbcc2ea190965fb3da1092ff6683e0e54454c6a9d (diff)
downloadlilv-d33da68e658d171540ceec8f89464783e50267a6.tar.gz
lilv-d33da68e658d171540ceec8f89464783e50267a6.tar.bz2
lilv-d33da68e658d171540ceec8f89464783e50267a6.zip
More Jack hacks. Dmitry owes me $20.
git-svn-id: http://svn.drobilla.net/lad/slv2@428 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'hosts')
-rw-r--r--hosts/jack_compat.h9
-rw-r--r--hosts/lv2_jack_host.c5
2 files changed, 14 insertions, 0 deletions
diff --git a/hosts/jack_compat.h b/hosts/jack_compat.h
index 792148e..a1f710d 100644
--- a/hosts/jack_compat.h
+++ b/hosts/jack_compat.h
@@ -45,6 +45,15 @@ jack_midi_event_get_compat(
#define jack_midi_event_get jack_midi_event_get_compat
+void
+jack_midi_clear_buffer_compat(
+ void * port_buffer)
+{
+ jack_midi_clear_buffer(port_buffer, 0);
+}
+
+#define jack_midi_clear_buffer jack_midi_clear_buffer_compat
+
#else
#if defined(HAVE_OLD_JACK_MIDI)
diff --git a/hosts/lv2_jack_host.c b/hosts/lv2_jack_host.c
index 93a17e1..62fe0e9 100644
--- a/hosts/lv2_jack_host.c
+++ b/hosts/lv2_jack_host.c
@@ -294,8 +294,13 @@ jack_process_cb(jack_nframes_t nframes, void* data)
for (uint32_t i=0; i < event_count; ++i) {
lv2midi_get_event(&state, &timestamp, &size, &data);
+#if defined(JACK_MIDI_NEEDS_NFRAMES)
+ jack_midi_event_write(jack_buffer,
+ (jack_nframes_t)timestamp, data, size, nframes);
+#else
jack_midi_event_write(jack_buffer,
(jack_nframes_t)timestamp, data, size);
+#endif
lv2midi_increment(&state);
}