From fc77ae0738565770abde1a25f650a035cf082af0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 19 Jan 2013 07:00:43 +0000 Subject: 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 --- libs/ardour/midi_ring_buffer.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'libs/ardour/midi_ring_buffer.cc') diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc index 0f08247cb9..21f840af10 100644 --- a/libs/ardour/midi_ring_buffer.cc +++ b/libs/ardour/midi_ring_buffer.cc @@ -43,7 +43,6 @@ MidiRingBuffer::read(MidiBuffer& dst, framepos_t start, framepos_t end, frame } T ev_time; - Evoral::EventType ev_type; uint32_t ev_size; size_t count = 0; const size_t prefix_size = sizeof(T) + sizeof(Evoral::EventType) + sizeof(uint32_t); @@ -58,7 +57,6 @@ MidiRingBuffer::read(MidiBuffer& dst, framepos_t start, framepos_t end, frame assert (this->peek (peekbuf, prefix_size)); ev_time = *((T*) peekbuf); - ev_type = *((Evoral::EventType*)(peekbuf + sizeof (T))); ev_size = *((uint32_t*)(peekbuf + sizeof(T) + sizeof (Evoral::EventType))); if (ev_time >= end) { -- cgit v1.2.3