another unusued parameter fix
[ardour.git] / libs / ardour / midi_state_tracker.cc
index 7537ca04d1d4346722c0ed0472fc66f6e6392d51..73b6fb639e1ea0e1db4823fcdc92449e5863ea44 100644 (file)
 #include "pbd/compose.h"
 #include "pbd/stacktrace.h"
 
+#include "evoral/EventSink.hpp"
+
 #include "ardour/debug.h"
 #include "ardour/event_type_map.h"
-#include "ardour/midi_ring_buffer.h"
 #include "ardour/midi_source.h"
 #include "ardour/midi_state_tracker.h"
 
@@ -93,18 +94,12 @@ MidiStateTracker::remove (uint8_t note, uint8_t chn)
 }
 
 void
-MidiStateTracker::track (const MidiBuffer::iterator &from, const MidiBuffer::iterator &to, bool& looped)
+MidiStateTracker::track (const MidiBuffer::iterator &from, const MidiBuffer::iterator &to)
 {
-       looped = false;
-
-       // DEBUG_TRACE (PBD::DEBUG::MidiTrackers, string_compose ("%1 track notes, looped = %2\n", this, looped));
+       // DEBUG_TRACE (PBD::DEBUG::MidiTrackers, string_compose ("%1 track notes\n", this));
 
        for (MidiBuffer::iterator i = from; i != to; ++i) {
                const Evoral::MIDIEvent<MidiBuffer::TimeType> ev(*i, false);
-               if (ev.event_type() == LoopEventType) {
-                       looped = true;
-                       continue;
-               }
 
                /* catch AllNotesOff message and turn off all notes
                 */
@@ -131,7 +126,7 @@ MidiStateTracker::resolve_notes (MidiBuffer &dst, framepos_t time)
        for (int channel = 0; channel < 16; ++channel) {
                for (int note = 0; note < 128; ++note) {
                        while (_active_notes[note + 128 * channel]) {
-                               uint8_t buffer[3] = { MIDI_CMD_NOTE_OFF | channel, note, 0 };
+                               uint8_t buffer[3] = { ((uint8_t) (MIDI_CMD_NOTE_OFF | channel)), uint8_t (note), 0 };
                                Evoral::MIDIEvent<MidiBuffer::TimeType> noteoff
                                        (MIDI_CMD_NOTE_OFF, time, 3, buffer, false);
                                /* note that we do not care about failure from