shithub: sox

Download patch

ref: 29ee836190f42404011afc44d4d40e5945d731ba
parent: d365f98fa5311c8f55b939d36a3d6b6d26e87657
author: cbagwell <cbagwell>
date: Sun Oct 17 17:58:16 EDT 2004

Fix soxmix default volume adjustment to not be 0.

--- a/Changelog
+++ b/Changelog
@@ -8,6 +8,8 @@
 -----------
   o Christian Weisgerber sent patches to man page fixes
     and patches for sunaudio driver on openbsd.
+  o Default volume for soxmix wrongly set to 0 instead
+    of 1/#_input_files (float rounding error).
 
 sox-12.17.6
 -----------
--- a/src/sox.c
+++ b/src/sox.c
@@ -217,7 +217,7 @@
          * this and will want to override it.
          */
         if (!file_opts[i]->uservolume)
-            file_opts[i]->volume = 1 / input_count;
+            file_opts[i]->volume = 1.0 / input_count;
 #endif
         copy_input(i);
         open_input(file_desc[i]);
--- a/src/tests.sh
+++ b/src/tests.sh
@@ -68,6 +68,7 @@
     echo "Conversion between unsigned bytes and float was successful"
 else
     echo "Error converting between float and unsigned bytes"
+    exit
 fi
 rm -f raw1.raw raw2.ub