shithub: sox

Download patch

ref: 42f5e3e079a4af7721934193b6854c9baeba4b93
parent: 96e23e25e04fb8b6600ffa2b88c7da6fb4a6d2cc
author: robs <robs>
date: Sat Nov 15 14:42:51 EST 2008

fix repeating stopping too early

--- a/src/repeat.c
+++ b/src/repeat.c
@@ -113,6 +113,7 @@
     p->remaining = 0;
 
     while (p->repeats > 0) {
+      lsx_debug("repeats=%u", p->repeats);
       p->repeats--;
       fseeko(p->tmp_file, (off_t) 0, SEEK_SET);
 
@@ -148,7 +149,7 @@
     p->remaining -= *osamp;
   }
 
-  if (p->remaining == 0)
+  if (p->repeats == 0 && p->remaining == 0)
     return SOX_EOF;
   else
     return SOX_SUCCESS;