Fix never-ending timestretch
authorRobin Gareus <robin@gareus.org>
Tue, 26 Feb 2019 00:57:02 +0000 (01:57 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 26 Feb 2019 00:57:02 +0000 (01:57 +0100)
This is relevant when time-stretch is canceled. In that case
stretcher.process() is never called with final=true, and hence
stretcher.available() will always return a value >=0.

libs/ardour/rb_effect.cc

index 23ffa944608ae03b458e25b92befb778b1993d1a..70053a3225eb7440a39f2191329e0df565536afe 100644 (file)
@@ -302,7 +302,7 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress* progress)
                        }
                }
 
-               while ((avail = stretcher.available()) >= 0) {
+               while ((avail = stretcher.available()) > 0) {
 
                        samplecnt_t this_read = min (bufsize, avail);