shithub: sox

Download patch

ref: c694b451670e3c54ce38844504bd59c3944507bd
parent: a2cf03b1cefb3d62e7da22caddf969a29005efe4
author: cbagwell <cbagwell>
date: Sat Sep 10 17:40:39 EDT 2005

Typos and document updates

--- a/Changelog
+++ b/Changelog
@@ -21,6 +21,9 @@
     played with a sped up tempo.
     Bugfix will also apply to other times when multiple effects
     are ran on the command line.
+  o Added support for -V option to play/rec scripts.
+  o Fix to silence effect to allow negative periods to be specified
+    (to remove silence from middle of sound file).
 
 sox-12.17.8
 -----------
--- a/play.1
+++ b/play.1
@@ -36,6 +36,9 @@
 .B \-d [device], \-\-device=[device]
 Specify a different device to play the sound file to.
 .TP
+.B \-\-file
+Next specified option is FILENAME.
+.TP
 .B \-f [format], \-\-format=[format]
 Specify bit format of the sample. One of s, u, U, A, a, or g.
 .TP
@@ -51,6 +54,9 @@
 .TP
 .B \-v [volume], \-\-volume=[volume]
 Change the audio volume
+.TP
+.B \-V, \-\-verbose
+Print verbose information during processing
 .TP
 .B \-x , \-\-xinu
 Reverse the byte order of the sample (only works with 16 and 32-bit data).
--- a/sox.1
+++ b/sox.1
@@ -219,6 +219,12 @@
 .br
         soxmix music.wav voice.wav mixed.wav
 .PP
+\fBFilenames:\fR
+.PP
+SoX can be used as a part of pipe operations by using the special
+filenames of "-".  If specified as an input name, it will read data
+from stdin.  If specified as an output name, it will send data
+to stdout.
 \fBFormat options:\fR
 .PP
 Format options effect the audio samples that they immediately precede.  If
@@ -954,8 +960,8 @@
 the \fBnoiseprof\fR effect on a section of silence
 (that is, a section which contains
 nothing but noise). The \fBnoiseprof\fR effect will print a noise profile
-to \fIprofile-fire-fR, or to stdout if no \fIprofile-file\fR is specified.
-If there is sound output on stdout then the profile will next be directed to
+to \fIprofile-file\fR, or to stdout if no \fIprofile-file\fR is specified.
+If there is sound output on stdout then the profile will instead be directed to
 stderr.
 
 To actually remove the noise, run SoX again with the \fInoisered\fR filter. The
@@ -1190,7 +1196,7 @@
 .br
 When trimming silence from the beginning of a sound file, you specify a duration of audio that is above a given silence threshold before audio data is processed.  You can also specify the count of periods of none-silence you want to detect before processing audio data.  Specify a period of 0 if you do not want to trim data from the front of the sound file.
 .br
-When optionally trimming silence form the end of a sound file, you specify the duration of audio that must be below a given threshold before stopping to process audio data.  A count of periods that occur below the threshold may also be specified.  If this options are not specified then data is not trimmed from the end of the audio file.  If \fIbelow_periods\fR is negative, it is treated as a positive value and is also used to indicate the effect should restart processing as specified by the \fIabove_periods\fR, making it suitable for removing periods of silence in the middle of a sound file.
+When optionally trimming silence from the end of a sound file, you specify the duration of audio that must be below a given threshold before stopping to process audio data.  A count of periods that occur below the threshold may also be specified.  If this options are not specified then data is not trimmed from the end of the audio file.  If \fIbelow_periods\fR is negative, it is treated as a positive value and is also used to indicate the effect should restart processing as specified by the \fIabove_periods\fR, making it suitable for removing periods of silence in the middle of a sound file.
 .br
 Duration counts may be in the format of time, hh:mm:ss.frac, or in the exact count of samples.
 .br
--- a/src/misc.c
+++ b/src/misc.c
@@ -55,7 +55,7 @@
         "gsm",
         "inversed u-law",
         "inversed A-law",
-        "MPEG audio (layer I, III or III)"
+        "MPEG audio (layer I, II or III)"
 };
 
 static const char readerr[] = "Premature EOF while reading sample file.";
--- a/src/play.in
+++ b/src/play.in
@@ -53,6 +53,7 @@
                                SIZE is either b, w, l, f, d, or D
   -t, --type=TYPE              specifies file format of FILE
   -v, --volume=VOLUME          change amplitude
+  -V, --verbose                print verbose information
   -x, --xinu                   reverse bit order of sample
                                (only works with 16-bit and 32-bit integer data)
       --file                   next argument is FILE
@@ -125,6 +126,9 @@
 	--volume=*)
 	    volume="-v `echo $1 | sed 's/.*=//'`"
 	    ;;
+        -V|--verbose)
+            fopts="$fopts -V"
+            ;;
 	-x|--xinu)
 	    fopts="$fopts -x"
 	    ;;
--- a/src/silence.c
+++ b/src/silence.c
@@ -164,8 +164,6 @@
         {
             silence->stop_periods = -silence->stop_periods;
             silence->restart = 1;
-            st_fail("Periods must not be greater then zero");
-            return(ST_EOF);
         }
         else
             silence->restart = 0;