use pbd's gstdio compatibility wrapper
[ardour.git] / libs / ardour / midi_ring_buffer.cc
index c2e040d947ceb2b2aefa4a4950926d24203cc25e..3923e5306a0da17fef85d6364ddf26f14a66001d 100644 (file)
@@ -103,7 +103,7 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, framepos_t start, framepos_t end, frame
                bool success = read_contents (ev_size, write_loc);
 
 #ifndef NDEBUG
-               if (DEBUG::MidiDiskstreamIO && PBD::debug_bits) {
+               if (DEBUG_ENABLED (DEBUG::MidiDiskstreamIO)) {
                        DEBUG_STR_DECL(a);
                        DEBUG_STR_APPEND(a, string_compose ("wrote MidiEvent to Buffer (time=%1, start=%2 offset=%3)", ev_time, start, offset));
                        for (size_t i=0; i < ev_size; ++i) {
@@ -165,6 +165,18 @@ MidiRingBuffer<T>::skip_to(framepos_t start)
 
                ++count;
 
+               /* TODO investigate and think:
+                *
+                * Does it makes sense to keep track of notes
+                * that are skipped (because they're either too late
+                * (underrun) or never used (read-ahead, loop) ?
+                *
+                * skip_to() is called on the rinbuffer between
+                * disk and process. it seems wrong to track them
+                * (a potential synth never sees skipped notes, either)
+                * but there may be more to this.
+                */
+
                if (ev_size >= 8) {
                        this->increment_read_ptr (ev_size);
                } else {