Fix midi playback stopping after moving a note (#3718).
authorCarl Hetherington <carl@carlh.net>
Fri, 25 Feb 2011 17:00:09 +0000 (17:00 +0000)
committerCarl Hetherington <carl@carlh.net>
Fri, 25 Feb 2011 17:00:09 +0000 (17:00 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8957 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/midi_diskstream.cc

index 0ec17bc3aad0a2ccb7970b588dc563f9b1e946a5..96a34c661c72c12f13897acee2c5b9749a9346f9 100644 (file)
@@ -593,9 +593,9 @@ MidiDiskstream::commit (framecnt_t nframes)
        bool need_butler = false;
 
        if (_actual_speed < 0.0) {
-               playback_sample -= playback_distance;
+               playback_sample -= nframes;
        } else {
-               playback_sample += playback_distance;
+               playback_sample += nframes;
        }
 
        if (adjust_capture_position != 0) {
@@ -814,7 +814,6 @@ MidiDiskstream::do_refill ()
        uint32_t frames_read = g_atomic_int_get(&_frames_read_from_ringbuffer);
        uint32_t frames_written = g_atomic_int_get(&_frames_written_to_ringbuffer);
        if ((frames_written - frames_read) >= midi_readahead) {
-               //cout << "MDS Nothing to do. all fine" << endl;
                return 0;
        }