summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_port.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-19 07:00:43 +0000
committerDavid Robillard <d@drobilla.net>2013-01-19 07:00:43 +0000
commitfc77ae0738565770abde1a25f650a035cf082af0 (patch)
treef4edb7bcdcddf186fcf5cf4fb033e602580e4008 /libs/ardour/midi_port.cc
parentd251c68d7676a18ab9ed935e22558e2b18981b41 (diff)
Replace a bunch of potential crashes with graceful handling of the situation.
We really need some kind of more sophisticated assert macro that can be switched to non-fatal logging mode for release builds. A log message, which is often all that would happen, is a lot better than a trainwrecked performance... git-svn-id: svn://localhost/ardour2/branches/3.0@13892 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_port.cc')
-rw-r--r--libs/ardour/midi_port.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc
index 0856666159..cc72eabba4 100644
--- a/libs/ardour/midi_port.cc
+++ b/libs/ardour/midi_port.cc
@@ -47,8 +47,6 @@ MidiPort::cycle_start (pframes_t nframes)
_buffer->clear ();
- assert (_buffer->size () == 0);
-
if (sends_output ()) {
jack_midi_clear_buffer (jack_port_get_buffer (_jack_port, nframes));
}
@@ -68,8 +66,6 @@ MidiPort::get_midi_buffer (pframes_t nframes)
void* jack_buffer = jack_port_get_buffer (_jack_port, nframes);
const pframes_t event_count = jack_midi_get_event_count (jack_buffer);
- assert (event_count < _buffer->capacity());
-
/* suck all relevant MIDI events from the JACK MIDI port buffer
into our MidiBuffer
*/