*/
#include "pbd/compose.h"
+#include "pbd/enumwriter.h"
#include "pbd/error.h"
#include "ardour/debug.h"
/* this cannot fail, because we've already verified that there
is prefix_space to read
*/
- assert (this->peek (peekbuf, prefix_size));
+ this->peek (peekbuf, prefix_size);
ev_time = *((T*) peekbuf);
ev_size = *((uint32_t*)(peekbuf + sizeof(T) + sizeof (Evoral::EventType)));
this->increment_read_ptr (prefix_size);
uint8_t status;
- assert (this->peek (&status, sizeof(uint8_t))); // If this failed, buffer is corrupt, all hope is lost
-
- // Ignore event if it doesn't match channel filter
- if (is_channel_event(status) && get_channel_mode() == FilterChannels) {
- const uint8_t channel = status & 0x0F;
- if (!(get_channel_mask() & (1L << channel))) {
- DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose ("MRB skipping event (%3 bytes) due to channel mask (mask = %1 chn = %2)\n",
- get_channel_mask(), (int) channel, ev_size));
- this->increment_read_ptr (ev_size); // Advance read pointer to next event
- continue;
- }
- }
+ bool r = this->peek (&status, sizeof(uint8_t));
+ assert (r); // If this failed, buffer is corrupt, all hope is lost
/* lets see if we are going to be able to write this event into dst.
*/
} else if (is_note_off(write_loc[0])) {
_tracker.remove (write_loc[1], write_loc[0] & 0xf);
}
-
- if (is_channel_event(status) && get_channel_mode() == ForceChannel) {
- write_loc[0] = (write_loc[0] & 0xF0) | (get_channel_mask() & 0x0F);
- }
+
++count;
} else {
cerr << "WARNING: error reading event contents from MIDI ring" << endl;