summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/ardour/midi_diskstream.h2
-rw-r--r--libs/ardour/midi_diskstream.cc18
-rw-r--r--libs/ardour/midi_ring_buffer.cc7
3 files changed, 13 insertions, 14 deletions
diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h
index 8ebbf4ce04..7a0daf37e8 100644
--- a/libs/ardour/ardour/midi_diskstream.h
+++ b/libs/ardour/ardour/midi_diskstream.h
@@ -179,7 +179,7 @@ class MidiDiskstream : public Diskstream
boost::shared_ptr<SMFSource> _write_source;
nframes_t _last_flush_frame;
NoteMode _note_mode;
- MidiStateTracker _midistate_tracker;
+ MidiStateTracker _midi_state_tracker;
volatile gint _frames_written_to_ringbuffer;
volatile gint _frames_read_from_ringbuffer;
};
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc
index 108dcb21a5..8d79906f04 100644
--- a/libs/ardour/midi_diskstream.cc
+++ b/libs/ardour/midi_diskstream.cc
@@ -1491,16 +1491,16 @@ MidiDiskstream::get_playback(MidiBuffer& dst, nframes_t start, nframes_t end, nf
// Translates stamps to be relative to start, but add offset.
const size_t events_read = _playback_buf->read(dst, start, end, offset);
- gint32 frames_read = end-start;
- cout << "frames read = " << frames_read << " events read = " << events_read << " end=" << end << " start=" << start << " offset= " << offset
- << " readspace " << _playback_buf->read_space() << " writespace " << _playback_buf->write_space() << endl;
+ gint32 frames_read = end - start;
+ /*cout << "frames read = " << frames_read << " events read = " << events_read
+ << " end = " << end << " start = " << start << " offset = " << offset
+ << " readspace " << _playback_buf->read_space()
+ << " writespace " << _playback_buf->write_space() << endl;*/
g_atomic_int_add(&_frames_read_from_ringbuffer, frames_read);
- // Now feed the data through the MidiStateTracker.
- // In case it detects a LoopEvent it will add necessary note
- // offs.
-
- if (_midistate_tracker.track(this_cycle_start, dst.end())) {
- _midistate_tracker.resolve_notes(dst, end-start - 1 + offset);
+ // Feed the data through the MidiStateTracker
+ // If it detects a LoopEvent it will add necessary note offs
+ if (_midi_state_tracker.track(this_cycle_start, dst.end())) {
+ _midi_state_tracker.resolve_notes(dst, end-start - 1 + offset);
}
}
diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc
index eba1a9156b..1f5177614a 100644
--- a/libs/ardour/midi_ring_buffer.cc
+++ b/libs/ardour/midi_ring_buffer.cc
@@ -98,7 +98,7 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, nframes_t start, nframes_t end, nframes
ev_time -= start;
ev_time += offset;
- // this writes the timestamp to address (write_loc - 1)
+ // write the timestamp to address (write_loc - 1)
uint8_t* write_loc = dst.reserve(ev_time, ev_size);
if (write_loc == NULL) {
cerr << "MRB: Unable to reserve space in buffer, event skipped";
@@ -108,12 +108,11 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, nframes_t start, nframes_t end, nframes
// write MIDI buffer contents
success = Evoral::EventRingBuffer<T>::full_read(ev_size, write_loc);
- cerr << "wrote MidiEvent to Buffer: ";
+ /*cerr << "wrote MidiEvent to Buffer: ";
for (size_t i=0; i < ev_size; ++i) {
printf("%X ", write_loc[i]);
}
- printf("\n");
-
+ printf("\n");*/
if (success) {
if (is_channel_event(status) && get_channel_mode() == ForceChannel) {