shithub: sox

Download patch

ref: 959708b982613fa3d0b0aefe278c5188b6a94d67
parent: 8e885645b873d09a8dac2feaee210c6f7c30b2f9
parent: f16cdf32fdcb9b60c11a85ed64d7e88daab6a567
author: Rob Sykes <robs@users.sourceforge.net>
date: Mon Jul 16 04:02:44 EDT 2012

Merge branch 'master' of ssh://sox.git.sourceforge.net/gitroot/sox/sox

--- a/sox.1
+++ b/sox.1
@@ -880,7 +880,7 @@
 will process audio channels for most multi-channel
 effects in parallel on hyper-threading/multi-core architectures. This
 may reduce processing time, though sometimes it may be necessary to use
-this option in conjuction with a larger buffer size than is the default
+this option in conjunction with a larger buffer size than is the default
 to gain any benefit from multi-threaded processing
 (e.g. 131072; see \fB\-\-buffer\fR above).
 .TP
@@ -3122,7 +3122,7 @@
 .EX
    rate 2k spectrogram \-X 200 \-Z \-10 \-w kaiser
 .EE
-Options are also avaliable to control the appearance (colour-set,
+Options are also available to control the appearance (colour-set,
 brightness, contrast, etc.) and filename of the spectrogram; e.g. with
 .EX
    sox my.wav \-n spectrogram \-m \-l \-o print.png
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -142,36 +142,31 @@
 	     CMakeLists.txt soxconfig.h.cmake \
 	     tests.sh testall.sh tests.bat testall.bat test-comments
 
-all: sox$(EXEEXT) play rec soxi sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT)
+all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT) sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT)
 
-play rec: sox$(EXEEXT)
+play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT): sox$(EXEEXT)
 	if test "$(PLAYRECLINKS)" = "yes"; then	\
 		test -f sox$(EXEEXT) && ( $(RM) $@ && $(LN_S) sox$(EXEEXT) $@ ) || $(LN_S) sox $@; \
 	fi
 
-soxi: sox$(EXEEXT)
-	if test "$(SYMLINKS)" = "yes"; then	\
-		test -f sox$(EXEEXT) && ( $(RM) $@ && $(LN_S) sox$(EXEEXT) $@ ) || $(LN_S) sox $@; \
-	fi
-
 install-exec-hook:
 	if test "$(PLAYRECLINKS)" = "yes"; then	\
-		cd $(DESTDIR)$(bindir); $(RM) play rec; $(LN_S) sox play; $(LN_S) sox rec; \
+		cd $(DESTDIR)$(bindir); $(RM) play$(EXEEXT) rec$(EXEEXT); $(LN_S) sox$(EXEEXT) play$(EXEEXT); $(LN_S) sox$(EXEEXT) rec$(EXEEXT); \
 	fi
 	if test "$(SYMLINKS)" = "yes"; then	\
-		cd $(DESTDIR)$(bindir); $(RM) soxi; $(LN_S) sox soxi; \
+		cd $(DESTDIR)$(bindir); $(RM) soxi$(EXEEXT); $(LN_S) sox$(EXEEXT) soxi$(EXEEXT); \
 	fi
 
 uninstall-hook:
 	if test "$(PLAYRECLINKS)" = "yes"; then	\
-		cd $(DESTDIR)$(bindir); $(RM) play rec; \
+		cd $(DESTDIR)$(bindir); $(RM) play$(EXTEXT) rec$(EXEEXT); \
 	fi
 	if test "$(SYMLINKS)" = "yes"; then	\
-		cd $(DESTDIR)$(bindir); $(RM) soxi; \
+		cd $(DESTDIR)$(bindir); $(RM) soxi$(EXEEXT); \
 	fi
 
 clean-local:
-	$(RM) play rec soxi
+	$(RM) play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT)
 	$(RM) sox_sample_test$(EXEEXT)
 	$(RM) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT)
 
--- a/src/cvsd-fmt.c
+++ b/src/cvsd-fmt.c
@@ -68,7 +68,7 @@
     p->sample = max(p->step_mult * p->sample - p->step, SOX_SAMPLE_MIN);
 }
 
-static size_t read(sox_format_t * ft, sox_sample_t * buf, size_t len)
+static size_t cvsdread(sox_format_t * ft, sox_sample_t * buf, size_t len)
 {
   priv_t *p = (priv_t *) ft->priv;
   size_t i;
@@ -85,7 +85,7 @@
   return i;
 }
 
-static size_t write(sox_format_t * ft, sox_sample_t const * buf, size_t len)
+static size_t cvsdwrite(sox_format_t * ft, sox_sample_t const * buf, size_t len)
 {
   priv_t *p = (priv_t *) ft->priv;
   size_t i;
@@ -107,7 +107,7 @@
   static unsigned const write_encodings[] = {SOX_ENCODING_CVSD, 1, 0, 0};
   static sox_format_handler_t const handler = {SOX_LIB_VERSION_CODE,
     "Headerless Continuously Variable Slope Delta modulation (unfiltered)",
-    names, SOX_FILE_MONO, start, read, NULL, start, write, NULL,
+    names, SOX_FILE_MONO, start, cvsdread, NULL, start, cvsdwrite, NULL,
     lsx_rawseek, write_encodings, NULL, sizeof(priv_t)
   };
   return &handler;
--- a/src/formats.c
+++ b/src/formats.c
@@ -411,7 +411,7 @@
   fp->_r += PIPE_AUTO_DETECT_SIZE;
 #elif defined __GLIBC__
   fp->_IO_read_ptr = fp->_IO_read_base;
-#elif defined _MSC_VER || defined __MINGW_H || defined _ISO_STDIO_ISO_H
+#elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H
   fp->_ptr = fp->_base;
 #else
   /* To fix this #error, either simply remove the #error line and live without
@@ -804,7 +804,7 @@
   else return NULL;
   if (!handler->startwrite && !handler->write) {
     if (filetype1)
-      lsx_fail("file type `%s' isn't writeable", filetype);
+      lsx_fail("file type `%s' isn't writable", filetype);
     return NULL;
   }
   if (filetype1)
--- a/src/ladspa.c
+++ b/src/ladspa.c
@@ -23,7 +23,6 @@
 #include <assert.h>
 #include <limits.h>
 #include <string.h>
-#include <ltdl.h>
 #include "ladspa.h"
 
 static sox_effect_handler_t sox_ladspa_effect;
--- a/src/sox.c
+++ b/src/sox.c
@@ -1953,7 +1953,7 @@
 "FORMAT OPTIONS (fopts):",
 "Input file format options need only be supplied for files that are headerless.",
 "Output files will have the same format as the input file where possible and not",
-"overriden by any of various means including providing output format options.",
+"overridden by any of various means including providing output format options.",
 "",
 "-v|--volume FACTOR       Input file volume adjustment factor (real number)",
 "--ignore-length          Ignore input file length given in header; read to EOF",
--- a/src/waveaudio.c
+++ b/src/waveaudio.c
@@ -392,7 +392,7 @@
   return SOX_SUCCESS;
 }
 
-static size_t read(sox_format_t * ft, sox_sample_t* buf, size_t len)
+static size_t waveread(sox_format_t * ft, sox_sample_t* buf, size_t len)
 {
   size_t copied = 0;
   priv_t *priv = (priv_t*)ft->priv;
@@ -454,7 +454,7 @@
   return copied;
 }
 
-static size_t write(sox_format_t * ft, const sox_sample_t* buf, size_t len)
+static size_t wavewrite(sox_format_t * ft, const sox_sample_t* buf, size_t len)
 {
   size_t copied = 0;
   priv_t *priv = (priv_t*)ft->priv;
@@ -526,8 +526,8 @@
   static sox_format_handler_t const handler = {SOX_LIB_VERSION_CODE,
   "Windows Multimedia Audio", names,
   SOX_FILE_DEVICE | SOX_FILE_NOSTDIO,
-  start, read, stop,
-  start, write, stop,
+  start, waveread, stop,
+  start, wavewrite, stop,
   NULL, write_encodings, NULL, sizeof(priv_t)
   };
   return &handler;