ref: cf1349229423ba2a1911cec051d286a5fd7b0cc9
parent: 930ab836f2c803fc102a5f70877851407f638e70
author: robs <robs>
date: Sat Nov 8 01:06:22 EST 2008
make rate linear phase by default
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,8 +46,8 @@
Effects:
- o N.B. Changed to different default settings for `rate' effect;
- add -s -L options to be compatible with SoX v14.1.0. (robs)
+ o N.B. Reduced default bandwidth setting for `rate' effect from 99%
+ to 95%; use `rate -s' to be compatible with SoX v14.1.0. (robs)
o New options for `rate' effect to configure phase response,
band-width and aliasing. (robs)
o New options for 'dither' effect: RPDF, TPDF, noise-shaping. (robs)
@@ -80,7 +80,7 @@
Of most use with trim and silence effects. (cbagwell)
o Can now use multiple pipes as inputs to the combiner;
see `Special Filenames' in sox(1). (robs)
- o Display SoX build environment information with -V -V. (robs)
+ o Display SoX build/run environment information with -V -V. (robs)
o Display (with -V) the detected file-type if it differs from the
file extension. (robs)
o New -t option for soxi; to display the detected file type. (robs)
--- a/sox.1
+++ b/sox.1
@@ -2037,13 +2037,10 @@
using a quality level defined as follows:
.TS
center box;
-cI cI2w9 cI cI2w6 cIw6 lIw17
-cB c c c c l.
+cI cI2w9 cI2w6 cIw6 lIw17
+cB c c c l.
\ Quality T{
.na
-Phase Response
-T} T{
-.na
Band-width
T} Rej dB T{
.na
@@ -2052,7 +2049,7 @@
\-q T{
.na
quick
-T} linear n/a T{
+T} n/a T{
.na
\(~=30 @ \ Fs/4
T} T{
@@ -2059,15 +2056,15 @@
.na
playback on ancient hardware
T}
-\-l low linear 80% 100 T{
+\-l low 80% 100 T{
.na
playback on old hardware
T}
-\-m medium intermediate 95% 100 T{
+\-m medium 95% 100 T{
.na
audio playback
T}
-\-h high intermediate 95% 125 T{
+\-h high 95% 125 T{
.na
16-bit mastering (use with dither)
T}
@@ -2074,7 +2071,7 @@
\-v T{
.na
very high
-T} intermediate 95% 175 24-bit mastering
+T} 95% 175 24-bit mastering
.TE
.DT
.SP
@@ -2087,10 +2084,9 @@
audio. If no quality option is given, the quality level used is `high'.
.SP
The `quick' algorithm uses cubic interpolation; all others use
-band-limited interpolation. The `quick' and `low' quality
-algorithms have a `linear' phase response; for `medium', `high' and
-`very high', the phase response is configurable (see below), but
-defaults to `intermediate'.
+band-limited interpolation. By default, all algorithms have
+a `linear' phase response; for `medium', `high' and
+`very high', the phase response is configurable (see below).
.SP
The
.B rate
--- a/src/rate.c
+++ b/src/rate.c
@@ -566,7 +566,7 @@
char * dummy_p, * found_at, * opts = "+i:b:p:MILasqlmhv", * qopts = opts +12;
p->quality = -1;
- p->phase = 25;
+ p->phase = 50;
p->shared_ptr = &p->shared;
while ((c = getopt(argc, argv, opts)) != -1) switch (c) {
@@ -659,15 +659,15 @@
};
static char const * lines[] = {
"[-q|-l|-m|-h|-v] [override-options] RATE[k]",
- " PHASE BAND-",
- " QUALITY RESPONSE WIDTH REJ dB TYPICAL USE",
- " -q quick linear n/a ~30 @ Fs/4 playback on ancient hardware",
- " -l low linear 80% 100 playback on old hardware",
- " -m medium interm. 95% 100 audio playback",
- " -h high (default) interm. 95% 125 16-bit mastering (use with dither)",
- " -v very high interm. 95% 175 24-bit mastering",
+ " BAND-",
+ " QUALITY WIDTH REJ dB TYPICAL USE",
+ " -q quick n/a ~30 @ Fs/4 playback on ancient hardware",
+ " -l low 80% 100 playback on old hardware",
+ " -m medium 95% 100 audio playback",
+ " -h high (default) 95% 125 16-bit mastering (use with dither)",
+ " -v very high 95% 175 24-bit mastering",
" OVERRIDE OPTIONS (only with -m, -h, -v)",
- " -M/-I/-L Phase response = minimum/intermediate/linear",
+ " -M/-I/-L Phase response = minimum/intermediate/linear(default)",
" -s Steep filter (band-width = 99%)",
" -a Allow aliasing above the pass-band",
" -b 74-99.7 Any band-width %",
--
⑨