diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2009-02-02 08:50:36 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2009-02-02 08:50:36 +0000 |
commit | 858f0cb5abb7efe3be2940bc53a20ff000a11424 (patch) | |
tree | 351f1e77abcaacf7aac0780d7299dd4968a6c26b /libs/ardour/midi_diskstream.cc | |
parent | ae2e090e74b18b12423dab7c62d2645cbcc36459 (diff) |
* debugging output
* style guide
git-svn-id: svn://localhost/ardour2/branches/3.0@4476 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_diskstream.cc')
-rw-r--r-- | libs/ardour/midi_diskstream.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index b80f6217cf..108dcb21a5 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -1487,19 +1487,20 @@ MidiDiskstream::get_playback(MidiBuffer& dst, nframes_t start, nframes_t end, nf // Check only events added this offset cycle MidiBuffer::iterator this_cycle_start = dst.end(); - + // Translates stamps to be relative to start, but add offset. - _playback_buf->read(dst, start, end, offset); + const size_t events_read = _playback_buf->read(dst, start, end, offset); - gint32 data_read = end-start; - //cout << "data read = " << data_read << " e=" << end << " s=" << start << "off= " << offset - // << " readspace " << _playback_buf->read_space() << " writespace " << _playback_buf->write_space() << endl; - g_atomic_int_add(&_frames_read_from_ringbuffer, data_read); + 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())) + if (_midistate_tracker.track(this_cycle_start, dst.end())) { _midistate_tracker.resolve_notes(dst, end-start - 1 + offset); + } } |