shithub: sox

Download patch

ref: f146ff926e672d89f5e8c2db690e65f725b3e464
parent: 6ca72ad76621838ac7443ae4c921008d17a7fe4e
author: robs <robs>
date: Sun May 10 04:30:14 EDT 2009

filter -> sinc

--- a/sox.1
+++ b/sox.1
@@ -1509,7 +1509,7 @@
 .SP
 This effect supports the \fB\-\-plot\fR global option.
 .SP
-See also \fBfilter\fR for a bandpass filter with steeper shoulders.
+See also \fBsinc\fR for a bandpass filter with steeper shoulders.
 .TP
 \fBbandpass\fR\^|\^\fBbandreject\fR [\fB\-c\fR] \fIfrequency\fR[\fBk\fR]\fI width\fR[\fBh\fR\^|\^\fBk\fR\^|\^\fBo\fR\^|\^\fBq\fR]
 Apply a two-pole Butterworth band-pass or band-reject filter with
@@ -1525,7 +1525,7 @@
 .SP
 These effects support the \fB\-\-plot\fR global option.
 .SP
-See also \fBfilter\fR for a bandpass filter with steeper shoulders.
+See also \fBsinc\fR for a bandpass filter with steeper shoulders.
 .TP
 \fBbandreject \fIfrequency\fR[\fBk\fR]\fI width\fR[\fBh\fR\^|\^\fBk\fR\^|\^\fBo\fR\^|\^\fBq\fR]
 Apply a band-reject filter.
@@ -2279,7 +2279,7 @@
 .SP
 These effects support the \fB\-\-plot\fR global option.
 .SP
-See also \fBfilter\fR for filters with a steeper roll-off.
+See also \fBsinc\fR for filters with a steeper roll-off.
 .TP
 \fBladspa\fR \fBmodule\fR [\fBplugin\fR] [\fBargument\fR...]
 Apply a LADSPA [5] (Linux Audio Developer's Simple Plugin API) plugin.
@@ -2334,13 +2334,13 @@
 companding is typically used in FM radio:
 .EX
 .ne 8
-   play track1.wav gain -3 filter 8000- 32 100 mcompand \\
+   play track1.wav gain -3 sinc 8000- 29 100 mcompand \\
 	\(dq0.005,0.1 -47,-40,-34,-34,-17,-33\(dq 100 \\
 	\(dq0.003,0.05 -47,-40,-34,-34,-17,-33\(dq 400 \\
 	\(dq0.000625,0.0125 -47,-40,-34,-34,-15,-33\(dq 1600 \\
 	\(dq0.0001,0.025 -47,-40,-34,-34,-31,-31,-0,-30\(dq 6400 \\
 	\(dq0,0.025 -38,-31,-28,-28,-0,-25\(dq \\
-	gain 15 highpass 22 highpass 22 filter -17500 256 \\
+	gain 15 highpass 22 highpass 22 sinc -n 255 -b 16 -17500 \\
 	gain 9 lowpass -1 17801
 .EE
 The audio file is played with a simulated FM radio sound (or broadcast
--- a/soxformat.7
+++ b/soxformat.7
@@ -264,7 +264,7 @@
 be used with any bit-rate.  E.g.
 .EX
 	sox infile outfile.cvu rate 28k
-	play -r 28k outfile.cvu filter -3.4k
+	play -r 28k outfile.cvu sinc -3.4k
 .EE
 .TP
 .B .dat
@@ -597,7 +597,7 @@
 little can be done about the clipping, a DC offset can be removed by
 passing the decoded audio through a high-pass filter, e.g.:
 .EX
-	sox input.vox output.au highpass 10
+	sox input.vox output.wav highpass 10
 .EE
 .TP
 \&\fB.w64\fR (optional)
--- a/src/sinc.c
+++ b/src/sinc.c
@@ -42,8 +42,8 @@
     while (c && (c = getopt(argc, argv, "+ra:b:p:MILt:n:")) != -1) switch (c) {
       char * parse_ptr;
       case 'r': p->round = sox_true; break;
-      GETOPT_NUMERIC('a', att,  40 , 170)
-      GETOPT_NUMERIC('b', beta,  0 , 18)
+      GETOPT_NUMERIC('a', att,  40 , 180)
+      GETOPT_NUMERIC('b', beta,  0 , 256)
       GETOPT_NUMERIC('p', phase, 0, 100)
       case 'M': p->phase =  0; break;
       case 'I': p->phase = 25; break;