Fix error in diskstream fill calculations. Fixes #3426.
authorCarl Hetherington <carl@carlh.net>
Wed, 1 Sep 2010 01:46:38 +0000 (01:46 +0000)
committerCarl Hetherington <carl@carlh.net>
Wed, 1 Sep 2010 01:46:38 +0000 (01:46 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7725 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/midi_region.cc

index 91f9ee58ed5ffb2f958ab673ab95e16fc31ff661..df4d7f4b06bd4e1b2d4faee8583988eb2d9ee28b 100644 (file)
@@ -163,9 +163,8 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<nframes_t>&
                // handle resizing of beginnings of regions correctly
                output_buffer_position = _position - _start;
        } else {
-               // when _start is greater than _position, we have to subtract
-               // _start from the note times in the midi source
-               negative_output_buffer_position = _start;
+               // the reverse of the above
+               negative_output_buffer_position = _start - _position;
        }
 
        /*cerr << "MR read @ " << position << " * " << to_read