shithub: sox

Download patch

ref: fe37415768718214125ee0a4cf9ae8d3237755ea
parent: 7289e815250f95d076562fdc438d1aa9b51f694f
author: cbagwell <cbagwell>
date: Sat Sep 20 10:48:43 EDT 2008

cleanup

--- a/src/sox.c
+++ b/src/sox.c
@@ -368,6 +368,7 @@
 }
 
 /* Read up to max `wide' samples.  A wide sample contains one sample per channel
+            printf("effect %d obeg = %d oend = %d\n", e, effects_chain->effects[e]->obeg, effects_chain->effects[e]->oend);
  * from the input audio. */
 static size_t sox_read_wide(sox_format_t * ft, sox_sample_t * buf, size_t max)
 {
@@ -941,7 +942,7 @@
 
     fn = filename;
 
-    efn = expand_fn = malloc((size_t)1024);
+    efn = expand_fn = malloc((size_t)FILENAME_MAX);
 
     /* Find extension in case user didn't specify a substitution
      * marker.
@@ -974,7 +975,7 @@
                 char num[10];
                 char format[5];
 
-                found_marker = 1;
+                found_marker = sox_true;
 
                 strcpy(format, "%");
                 if (width)
@@ -1010,7 +1011,7 @@
         efn -= strlen (ext);
 
         sprintf(efn, "%03lu", (unsigned long)count);
-        efn = efn + 4;
+        efn = efn + 3;
         strcat(efn, ext);
     }