diff options
author | David Robillard <d@drobilla.net> | 2012-04-11 20:14:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-11 20:14:10 +0000 |
commit | 2ac525df826f4dadfc3358cd75c3aa8b03ad548d (patch) | |
tree | f5c9c75a76778a66053db548cdec0db223eb9737 /src/jalv.c | |
parent | 081425005a2b61093b97eecb1d72cf58a5c17b7a (diff) | |
download | jalv-2ac525df826f4dadfc3358cd75c3aa8b03ad548d.tar.gz jalv-2ac525df826f4dadfc3358cd75c3aa8b03ad548d.tar.bz2 jalv-2ac525df826f4dadfc3358cd75c3aa8b03ad548d.zip |
Fix Jack MIDI output.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@4165 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/jalv.c')
-rw-r--r-- | src/jalv.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -464,9 +464,11 @@ jack_process_cb(jack_nframes_t nframes, void* data) uint32_t frames, subframes, type, size; uint8_t* data; lv2_evbuf_get(i, &frames, &subframes, &type, &size, &data); - assert(size > 0); - // FIXME: check type - jack_midi_event_write(buf, frames, data, size); + if (type == host->midi_event_id) { + jack_midi_event_write(buf, frames, data, size); + } else { + fprintf(stderr, "Non-MIDI event output type %d\n", type); + } /* TODO: Be more disciminate about what to send */ if (!port->old_api) { @@ -671,11 +673,12 @@ main(int argc, char** argv) host.sratom = sratom_new(&host.map); - host.midi_event_id = uri_to_id(&host, - "http://lv2plug.in/ns/ext/event", - NS_MIDI "MidiEvent"); + host.midi_event_id = uri_to_id( + &host, "http://lv2plug.in/ns/ext/event", LV2_MIDI__MidiEvent); + host.urids.atom_eventTransfer = symap_map(host.symap, LV2_ATOM__eventTransfer); host.urids.log_Trace = symap_map(host.symap, LV2_LOG__Trace); + host.urids.midi_MidiEvent = symap_map(host.symap, LV2_MIDI__MidiEvent); host.urids.time_Position = symap_map(host.symap, LV2_TIME__Position); host.urids.time_bar = symap_map(host.symap, LV2_TIME__bar); host.urids.time_barBeat = symap_map(host.symap, LV2_TIME__barBeat); |