shithub: sox

Download patch

ref: e37c58bcf1e9ebb89d2f622809f6936742526b7b
parent: b5facd7d567c31731fa6ddb435f684614d4989f3
author: robs <robs>
date: Sun Jan 27 06:22:00 EST 2008

set default compression (esp. for non-sox apps)

--- a/src/soxio.c
+++ b/src/soxio.c
@@ -2,6 +2,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <math.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
@@ -209,6 +210,7 @@
     ft->signal.size = -1;
     ft->signal.encoding = SOX_ENCODING_UNKNOWN;
     ft->signal.channels = 0;
+    ft->signal.compression = HUGE_VAL;
     if (info)
         ft->signal = *info;
 
@@ -301,6 +303,7 @@
     ft->signal.size = -1;
     ft->signal.encoding = SOX_ENCODING_UNKNOWN;
     ft->signal.channels = 0;
+    ft->signal.compression = HUGE_VAL;
     if (info)
         ft->signal = *info;