diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-09 13:00:54 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-09 13:00:54 +0000 |
commit | 1e728e728a79d9b272cc18bc1c46f0c3c8831bf8 (patch) | |
tree | 6ecd938ef19be41d6489540bca740f7a67d88de1 /libs/ardour/midi_port.cc | |
parent | 8f263c239a2090d43221d817442c8141dd439079 (diff) |
basically, fix all kinds of odds and ends with MIDI playback, including missed notes and applying gain
git-svn-id: svn://localhost/ardour2/branches/3.0@7247 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_port.cc')
-rw-r--r-- | libs/ardour/midi_port.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc index 8dddc39fe3..40cb48f54f 100644 --- a/libs/ardour/midi_port.cc +++ b/libs/ardour/midi_port.cc @@ -137,8 +137,14 @@ MidiPort::flush_buffers (nframes_t nframes, nframes64_t time, nframes_t offset) assert(ev.time() < (nframes+offset+_port_offset)); if (ev.time() >= offset + _port_offset) { - jack_midi_event_write (jack_buffer, (jack_nframes_t) ev.time(), ev.buffer(), ev.size()); - } + if (jack_midi_event_write (jack_buffer, (jack_nframes_t) ev.time(), ev.buffer(), ev.size()) != 0) { + cerr << "write failed, drop flushed note off on the floor, time " << ev.time() << " > " << offset << " + " << _port_offset + << endl; + } + } else { + cerr << "drop flushed note off on the floor, time " << ev.time() << " > " << offset << " + " << _port_offset + << endl; + } } } } |