shithub: sox

Download patch

ref: 2c1b8ba27e95fcd918b5fc2bbbc0720c7b0ec6e6
parent: 2bc58856c06f6aa0c77a74ef5b9557db951088af
author: cbagwell <cbagwell>
date: Tue Feb 22 22:17:26 EST 2011

Miscalculated consumed samples when short buffer was provided.

--- a/src/coreaudio.c
+++ b/src/coreaudio.c
@@ -50,7 +50,7 @@
   if (len < output_len)
       memset(buf+len, 0, output_len-len);
 
-  ac->buf_offset = 0;
+  ac->buf_offset -= len;
 
   pthread_mutex_unlock(&ac->mutex);
   pthread_cond_signal(&ac->cond);