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(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(new AlsaMidiEvent (timestamp, buffer, size))); return 0; diff --git a/libs/backends/coreaudio/coreaudio_backend.cc b/libs/backends/coreaudio/coreaudio_backend.cc index 8946aea0a7..50477b6d08 100644 --- a/libs/backends/coreaudio/coreaudio_backend.cc +++ b/libs/backends/coreaudio/coreaudio_backend.cc @@ -1227,9 +1227,11 @@ CoreAudioBackend::midi_event_put ( if (!buffer || !port_buffer) return -1; CoreMidiBuffer& dst = * static_cast(port_buffer); if (dst.size () && (pframes_t)dst.back ()->timestamp () > timestamp) { - fprintf (stderr, "CoreMidiBuffer: it's too late for this event. %d > %d\n", +#ifndef NDEBUG + // nevermind, ::get_buffer() sorts events + fprintf (stderr, "CoreMidiBuffer: unordered event: %d > %d\n", (pframes_t)dst.back ()->timestamp (), timestamp); - return -1; +#endif } dst.push_back (boost::shared_ptr(new CoreMidiEvent (timestamp, buffer, size))); return 0; diff --git a/libs/backends/dummy/dummy_audiobackend.cc b/libs/backends/dummy/dummy_audiobackend.cc index 462f1b9dc3..cf49c7d5e8 100644 --- a/libs/backends/dummy/dummy_audiobackend.cc +++ b/libs/backends/dummy/dummy_audiobackend.cc @@ -981,8 +981,8 @@ DummyAudioBackend::midi_event_put ( assert (buffer && port_buffer); DummyMidiBuffer& dst = * static_cast(port_buffer); if (dst.size () && (pframes_t)dst.back ()->timestamp () > timestamp) { + // nevermind, ::get_buffer() sorts events, but always print warning fprintf (stderr, "DummyMidiBuffer: it's too late for this event.\n"); - return -1; } dst.push_back (boost::shared_ptr(new DummyMidiEvent (timestamp, buffer, size))); return 0;