Don't update start more than once when reversing. I don't think this is causing...
authorCarl Hetherington <carl@carlh.net>
Sun, 6 Feb 2011 18:32:05 +0000 (18:32 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 6 Feb 2011 18:32:05 +0000 (18:32 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8726 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/audio_diskstream.cc

index 8428e05b39151fa6fd35d2f6c2890d29e02e239c..30dd556735988f9c817e372617ea3014259eb826 100644 (file)
@@ -926,12 +926,12 @@ AudioDiskstream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
                //cerr << "start is " << start << "  loopstart: " << loop_start << "  loopend: " << loop_end << endl;
        }
 
+       if (reversed) {
+               start -= cnt;
+       }
+       
        while (cnt) {
 
-               if (reversed) {
-                       start -= cnt;
-               }
-
                /* take any loop into account. we can't read past the end of the loop. */
 
                if (loc && (loop_end - start < cnt)) {