shithub: sox

Download patch

ref: fd2d41a5b2289b46956c68074272f5e1b3f0ddd0
parent: fdc0a5eee1370b1d757bcf4753d619467d124705
author: cbagwell <cbagwell>
date: Wed Jun 28 21:07:35 EDT 2006

Synth fix for exact stops and MP3 fix for writing stereo.

--- a/Changelog
+++ b/Changelog
@@ -11,7 +11,13 @@
     library.  Applications are now required to detect
     all failures from return codes and cleanup as they
     want.
-
+  o Changed how list of formats and effects are stored internally.
+    Effects libst users only.
+  o Modify the synth effect to not use SIGINT to stop processing
+    and instead return ST_EOF.  This allows exact acount of
+    samples to be written out instead of an approximate amount.
+  o Fix hangup when attempting to write stereo MP3 files.
+    (1512218) Kendrick Shaw
 
 sox-12.18.1
 ------------
--- a/src/mp3.c
+++ b/src/mp3.c
@@ -471,7 +471,7 @@
      goto end;
   }
 
-  done = nsamples;
+  done = nsamples*ft->info.channels;
 
  end:
   free(mp3buffer);
--- a/src/synth.c
+++ b/src/synth.c
@@ -721,13 +721,8 @@
         synth->samples_done++;
         if(synth->length > 0 ){
             if( synth->samples_done > synth->length){
-                /* break 'nul' file fileter when enough samples 
-                 * are produced. the actual number of samples 
-                 * will be a little bigger, depends on when the
-                 * signal gets to the plugin
-                 */
-                raise(SIGINT); /* only once */
                 *osamp = done*chan;
+                return ST_EOF;
                 break;
 
             }