diff options
author | Robin Gareus <robin@gareus.org> | 2015-03-09 05:41:36 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-03-09 05:41:36 +0100 |
commit | 09dd3fc369f0b9c666e5930353ca55def84d9e4e (patch) | |
tree | bfa557f8f591f361704c4d4c72c0de39b77d365d /libs/backends/alsa | |
parent | 59f12bd31a3baa0bd81beb77e7f77647b7c37e82 (diff) |
some backends can handle incorrectly ordered midi events.
(that can happen if multiple sources send to the same
ouput port, in particular async midi events)
Diffstat (limited to 'libs/backends/alsa')
-rw-r--r-- | libs/backends/alsa/alsa_audiobackend.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc index a18d58ee58..8befb9219c 100644 --- a/libs/backends/alsa/alsa_audiobackend.cc +++ b/libs/backends/alsa/alsa_audiobackend.cc @@ -1256,9 +1256,11 @@ AlsaAudioBackend::midi_event_put ( assert (buffer && port_buffer); AlsaMidiBuffer& dst = * static_cast<AlsaMidiBuffer*>(port_buffer); if (dst.size () && (pframes_t)dst.back ()->timestamp () > timestamp) { +#ifndef NDEBUG + // nevermind, ::get_buffer() sorts events fprintf (stderr, "AlsaMidiBuffer: it's too late for this event. %d > %d\n", (pframes_t)dst.back ()->timestamp (), timestamp); - return -1; +#endif } dst.push_back (boost::shared_ptr<AlsaMidiEvent>(new AlsaMidiEvent (timestamp, buffer, size))); return 0; |