summaryrefslogtreecommitdiff
path: root/libs/ardour/rt_midibuffer.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-10-17 23:15:53 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-11-02 16:32:18 -0600
commitaddebc3240e9f2f9f76defad680e310939b1d269 (patch)
tree3384b8ff3a4206db5630b920bca98ab66a1b1466 /libs/ardour/rt_midibuffer.cc
parent5c0fd05c52165af11df60c5930dacd8c2573d6b5 (diff)
move ownership of an RT MIDI buffer from DiskIO to MidiPlaylist
Diffstat (limited to 'libs/ardour/rt_midibuffer.cc')
-rw-r--r--libs/ardour/rt_midibuffer.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/libs/ardour/rt_midibuffer.cc b/libs/ardour/rt_midibuffer.cc
index 767bd29e95..6e381c48ed 100644
--- a/libs/ardour/rt_midibuffer.cc
+++ b/libs/ardour/rt_midibuffer.cc
@@ -35,7 +35,7 @@ using namespace std;
using namespace ARDOUR;
using namespace PBD;
-RTMidiBuffer::RTMidiBuffer (size_t capacity)
+RTMidiBuffer::RTMidiBuffer ()
: _size (0)
, _capacity (0)
, _data (0)
@@ -43,9 +43,6 @@ RTMidiBuffer::RTMidiBuffer (size_t capacity)
, _pool_capacity (0)
, _pool (0)
{
- if (capacity) {
- resize (capacity);
- }
}
RTMidiBuffer::~RTMidiBuffer()
@@ -102,16 +99,17 @@ RTMidiBuffer::dump (uint32_t cnt)
} else {
+ /* MIDI data is in bytes[1..3] (variable depending on message type */
size = Evoral::midi_event_size (item->bytes[1]);
addr = &item->bytes[1];
}
- cerr << "@ " << item->timestamp << " sz=" << size << '\t';
+ cerr << i << " @ " << item->timestamp << " sz=" << size << '\t';
cerr << hex;
for (size_t j =0 ; j < size; ++j) {
- cerr << "0x" << hex << (int)addr[j] << dec << '/' << (int)addr[i] << ' ';
+ cerr << "0x" << hex << (int)addr[j] << dec << '/' << (int)addr[j] << ' ';
}
cerr << dec << endl;
}
@@ -184,7 +182,7 @@ RTMidiBuffer::read (MidiBuffer& dst, samplepos_t start, samplepos_t end, MidiSta
TimeType unadjusted_time;
#endif
- DEBUG_TRACE (DEBUG::MidiRingBuffer, string_compose ("read from %1 .. %2 .. initial index = %3 (time = %4)\n", start, end, item, item->timestamp));
+ DEBUG_TRACE (DEBUG::MidiRingBuffer, string_compose ("read from %1 .. %2 .. initial index = %3 (time = %4) (range in list of %7 %5..%6)\n", start, end, item - _data, item->timestamp, _data->timestamp, iend->timestamp, _size));
while ((item < iend) && (item->timestamp < end)) {