modified version of a patch from robin gareus to avoid leaving pointers to data buffers owned by Session as the buffer for a JACK MIDI event. Robin - it would be good if you could test and confirm (email?) that my modified version also works

git-svn-id: svn://localhost/ardour2/branches/3.0@7218 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-06-03 12:37:32 +00:00
parent 460d2d0675
commit b12f624890

View File

@ -145,8 +145,14 @@ JACK_MidiPort::write(byte * msg, size_t msglen, timestamp_t timestamp)
}
if (vec.len[0]) {
if (!vec.buf[0]->owns_buffer()) {
vec.buf[0]->set_buffer (0, 0, true);
}
vec.buf[0]->set (msg, msglen, timestamp);
} else {
if (!vec.buf[1]->owns_buffer()) {
vec.buf[1]->set_buffer (0, 0, true);
}
vec.buf[1]->set (msg, msglen, timestamp);
}