ref: f05b1a3f9f311cb1b7f53c1ddc29c0ad644529c8
parent: 284d1de103828fc0d47cac0544abf15806da779e
author: Ulrich Klauer <ulrich@chirlu.de>
date: Mon Jan 23 19:38:51 EST 2012
Remove deprecated encoding options
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
Deprec- Feature [O(ption)]
ated in [F(ormat)] [E(ffect)] Replacement
------- ---------------------- ----------------------
+ 14.3.0 O -1/-2/-3/-4/-8 -b
+ 14.3.0 O -s/-u/-f -e
+ 14.3.0 O -A/-U/-o/-i/-a/-g -e
Previously deprecated features (to be removed in future):
@@ -20,9 +23,6 @@
------- ---------------------- ---------------------- -------
14.4.0 E mixer remix 2013-03-04
14.4.0 E swap with parameters remix 14.4.0
- 14.3.0 O -1/-2/-3/-4/-8 -b 14.4.0
- 14.3.0 O -s/-u/-f -e 14.4.0
- 14.3.0 O -A/-U/-o/-i/-a/-g -e 14.4.0
sox-14.4.0 2012-03-04
--- a/sox.1
+++ b/sox.1
@@ -1116,11 +1116,6 @@
converts raw CD digital audio (16-bit, signed-integer) to a
24-bit (signed-integer) `WAV' file.
.TP
-\fB\-1\fR\^/\fB\-2\fR\^/\fB\-3\fR\^/\fB\-4\fR\^/\fB\-8\fR
-The number of bytes in each encoded sample. Deprecated aliases for
-\fB\-b 8\fR, \fB\-b 16\fR, \fB\-b 24\fR, \fB\-b 32\fR, \fB\-b 64\fR
-respectively.
-.TP
\fB\-c\fR \fICHANNELS\fR, \fB\-\-channels\fR \fICHANNELS\fR
The number of audio channels in the audio file. This can be any number
greater than zero.
@@ -1234,13 +1229,6 @@
By default (i.e. if this option is not given), the output encoding
type will (providing it is supported by the output file type) be set
to the input encoding type.
-.TP
-\fB\-s\fR\^/\fB\-u\fR\^/\fB\-f\fR\^/\fB\-A\fR\^/\fB\-U\fR\^/\fB\-o\fR\^/\fB\-i\fR\^/\fB\-a\fR\^/\fB\-g\fR
-Deprecated aliases for specifying the encoding types
-\fBsigned-integer\fR, \fBunsigned-integer\fR, \fBfloating-point\fR, \fBa-law\fR, \fBmu-law\fR, \fBoki-adpcm\fR, \fBima-adpcm\fR, \fBms-adpcm\fR, \fBgsm-full-rate\fR
-respectively (see
-.B \-e
-above).
.TP
\fB\-\-no\-glob\fR
Specifies that filename `globbing' (wild-card matching) should not be
--- a/src/sox.c
+++ b/src/sox.c
@@ -2152,7 +2152,7 @@
}
static char const * const getoptstr =
- "+ab:c:de:fghimnopqr:st:uv:xABC:DGLMNRSTUV::X12348";
+ "+b:c:de:hmnpqr:t:v:xBC:DGLMNRSTV::X";
static struct lsx_option_t const long_options[] = {
{"add-comment" , lsx_option_arg_required, NULL, 0},
@@ -2458,34 +2458,6 @@
break;
}
break;
-
-#define DEPRECATED lsx_warn("Option `-%c' is deprecated, use `-b %i' instead.", c, (c-'0')*8)
- case '1': f->encoding.bits_per_sample = 8; DEPRECATED; break;
- case '2': f->encoding.bits_per_sample = 16; DEPRECATED; break;
- case '3': f->encoding.bits_per_sample = 24; DEPRECATED; break;
- case '4': f->encoding.bits_per_sample = 32; DEPRECATED; break;
- case '8': f->encoding.bits_per_sample = 64; DEPRECATED; break;
-#undef DEPRECATED
-
-#define DEPRECATED(encname) lsx_warn("Option `-%c' is deprecated, use `-e %s' instead.", c, encname)
- case 's': f->encoding.encoding = SOX_ENCODING_SIGN2; DEPRECATED("signed-integer"); break;
- case 'u': f->encoding.encoding = SOX_ENCODING_UNSIGNED; DEPRECATED("unsigned-integer"); break;
- case 'f': f->encoding.encoding = SOX_ENCODING_FLOAT; DEPRECATED("floating-point"); break;
- case 'a': f->encoding.encoding = SOX_ENCODING_MS_ADPCM; DEPRECATED("ms-adpcm"); break;
- case 'i': f->encoding.encoding = SOX_ENCODING_IMA_ADPCM; DEPRECATED("ima-adpcm"); break;
- case 'o': f->encoding.encoding = SOX_ENCODING_OKI_ADPCM; DEPRECATED("oki-adpcm"); break;
- case 'g': f->encoding.encoding = SOX_ENCODING_GSM; DEPRECATED("gsm-full-rate"); break;
-
- case 'U': f->encoding.encoding = SOX_ENCODING_ULAW; DEPRECATED("mu-law");
- if (f->encoding.bits_per_sample == 0)
- f->encoding.bits_per_sample = 8;
- break;
-
- case 'A': f->encoding.encoding = SOX_ENCODING_ALAW; DEPRECATED("a-law");
- if (f->encoding.bits_per_sample == 0)
- f->encoding.bits_per_sample = 8;
- break;
-#undef DEPRECATED
case 'L': case 'B': case 'x':
if (f->encoding.reverse_bytes != sox_option_default || f->encoding.opposite_endian)