ref: 11e06205d034eddcb13aca847dbc6de9a63b747e
parent: 20c688ed26a3c1a6a536e75bf415337921c1b992
author: rrt <rrt>
date: Tue Jan 16 11:35:20 EST 2007
Deprecate use of 'words' and similar language.
--- a/sox.1
+++ b/sox.1
@@ -73,8 +73,12 @@
(8kHz); audio Compact Discs use 44100Hz (44\*d1kHz).
.TP
sample size
-The number of bits (or bytes) used to store each sample. Most popular are
-8-bit (i.e. one byte) and 16-bit (i.e. two bytes, or one `word').
+The number of bits used to store each sample. Most popular are 8-bit
+(one byte) and 16-bit (two bytes). (Since many now-common sound
+formats were invented when most computers used a 16-bit word, two
+bytes is often called a `word', but since current personal computers
+overwhelmingly have 32-bit or 64-bit words, this usage is confusing,
+and is not used in the SoX documentation.)
.TP
data encoding
The way in which each audio sample is represented (or `encoded'). Some
@@ -616,12 +620,14 @@
It is usually CPU intensive to work with GSM audio.
.TP
\fB\-1\fR\^/\fB\-2\fR\^/\fB\-3\fR\^/\fB\-4\fR\^/\fB\-8\fR
-The sample datum size is 1, 2, 3, 4, or 8 bytes; i.e 8, 16, 24, 32, or 64 bits.
+The sample datum size is 1, 2, 3, 4, or 8 bytes; i.e. 8, 16, 24, 32, or 64 bits.
.TP
+The flags
\fB\-b\fR\^/\fB\-w\fR\^/\fB\-l\fR\^/\fB\-d\fR
-Aliases for
-\fB\-1\fR\^/\fB\-2\fR\^/\fB\-4\fR\^/\fB\-8\fR.
-Abbreviations of: byte, word, long word, double long (long long) word.
+which are respectively aliases for
+\fB\-1\fR\^/\fB\-2\fR\^/\fB\-4\fR\^/\fB\-8\fR,
+and abbreviate byte, word, long word, double long (long long) word,
+are retained for backwards compatibility only.
.SS Output File Format Options
These options apply only to the output file and may precede only the output
filename on the command line.
@@ -675,7 +681,7 @@
Sun Microsystems AU files.
There are many types of AU file;
DEC has invented its own with a different magic number
-and word order.
+and byte order.
SoX can read these files but will not write them.
Some .au files are known to have invalid AU headers; these
are probably original Sun \(*m-law 8000Hz files and
--- a/soxexam.7
+++ b/soxexam.7
@@ -60,11 +60,11 @@
.SP
Or more SoX-like (for `dsp' output on a UNIX/Linux computer):
.SP
- sox file.xxx \-t ossdsp \-w \-s /dev/dsp effect-name effect-parameters
+ sox file.xxx \-t ossdsp \-2 \-s /dev/dsp effect-name effect-parameters
.SP
or (for `au' output):
.SP
- sox file.xxx \-t sunau \-w \-s /dev/audio effect-name effect-parameters
+ sox file.xxx \-t sunau \-2 \-s /dev/audio effect-name effect-parameters
.SP
And for date freaks:
.SP
@@ -97,7 +97,7 @@
decays.
.SP
It is very popular to use echos to play an instrument with itself together,
-like some guitar players (Brain May from Queen) or vocalists are doing.
+like some guitar players (Queen's Brain May) or vocalists do.
For music samples of more than one instrument, echo can be used to add a
second sample shortly after the original one.
.SP
@@ -182,7 +182,7 @@
too many many visitors which disturb (dampen) the reflection of sound at
the walls. Reverb will make the sound be perceived as if it were in
a large hall. You can try the reverb effect in your bathroom or garage or
-sport halls by shouting loud some words. You'll hear the words reflected from
+sport hall by shouting loud some words. You'll hear the words reflected from
the walls.
.SP
The biggest problem in using the reverb effect is the correct setting of the
--- a/src/aiff.c
+++ b/src/aiff.c
@@ -413,7 +413,7 @@
}
else if (bits <= 16)
{
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
if (bits < 16)
st_report("Forcing data size from %d bits to 16 bits",bits);
}
@@ -425,7 +425,7 @@
}
else if (bits <= 32)
{
- ft->signal.size = ST_SIZE_DWORD;
+ ft->signal.size = ST_SIZE_32BIT;
if (bits < 32)
st_report("Forcing data size from %d bits to 32 bits",bits);
}
@@ -699,7 +699,7 @@
ft->signal.size == ST_SIZE_BYTE) {
st_report("expanding compressed bytes to signed 16 bits");
ft->signal.encoding = ST_ENCODING_SIGN2;
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
}
if (ft->signal.encoding != ST_ENCODING_UNKNOWN && ft->signal.encoding != ST_ENCODING_SIGN2)
st_report("AIFF only supports signed data. Forcing to signed.");
@@ -768,13 +768,13 @@
ft->signal.size == ST_SIZE_BYTE)
bits = 8;
else if (ft->signal.encoding == ST_ENCODING_SIGN2 &&
- ft->signal.size == ST_SIZE_WORD)
+ ft->signal.size == ST_SIZE_16BIT)
bits = 16;
else if (ft->signal.encoding == ST_ENCODING_SIGN2 &&
ft->signal.size == ST_SIZE_24BIT)
bits = 24;
else if (ft->signal.encoding == ST_ENCODING_SIGN2 &&
- ft->signal.size == ST_SIZE_DWORD)
+ ft->signal.size == ST_SIZE_32BIT)
bits = 32;
else
{
@@ -904,7 +904,7 @@
ft->signal.size == ST_SIZE_BYTE) {
st_report("expanding compressed bytes to signed 16 bits");
ft->signal.encoding = ST_ENCODING_SIGN2;
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
}
if (ft->signal.encoding != ST_ENCODING_UNKNOWN && ft->signal.encoding != ST_ENCODING_SIGN2)
st_report("AIFC only supports signed data. Forcing to signed.");
@@ -955,13 +955,13 @@
ft->signal.size == ST_SIZE_BYTE)
bits = 8;
else if (ft->signal.encoding == ST_ENCODING_SIGN2 &&
- ft->signal.size == ST_SIZE_WORD)
+ ft->signal.size == ST_SIZE_16BIT)
bits = 16;
else if (ft->signal.encoding == ST_ENCODING_SIGN2 &&
ft->signal.size == ST_SIZE_24BIT)
bits = 24;
else if (ft->signal.encoding == ST_ENCODING_SIGN2 &&
- ft->signal.size == ST_SIZE_DWORD)
+ ft->signal.size == ST_SIZE_32BIT)
bits = 32;
else
{
--- a/src/alsa.c
+++ b/src/alsa.c
@@ -342,7 +342,7 @@
return ST_EOF;
}
break;
- case ST_SIZE_WORD:
+ case ST_SIZE_16BIT:
switch(ft->signal.encoding)
{
case ST_ENCODING_SIGN2:
@@ -462,7 +462,7 @@
return 0;
}
break;
- case ST_SIZE_WORD:
+ case ST_SIZE_16BIT:
switch (ft->signal.encoding)
{
case ST_ENCODING_SIGN2:
@@ -522,27 +522,27 @@
static int get_format(ft_t ft, snd_pcm_format_mask_t *fmask, int *fmt)
{
if (ft->signal.size == -1)
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
if (ft->signal.encoding == ST_ENCODING_UNKNOWN)
{
- if (ft->signal.size == ST_SIZE_WORD)
+ if (ft->signal.size == ST_SIZE_16BIT)
ft->signal.encoding = ST_ENCODING_SIGN2;
else
ft->signal.encoding = ST_ENCODING_UNSIGNED;
}
- if (ft->signal.size != ST_SIZE_WORD &&
+ if (ft->signal.size != ST_SIZE_16BIT &&
ft->signal.size != ST_SIZE_BYTE)
{
st_report("driver only supports byte and word samples. Changing to word.");
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
}
if (ft->signal.encoding != ST_ENCODING_SIGN2 &&
ft->signal.encoding != ST_ENCODING_UNSIGNED)
{
- if (ft->signal.size == ST_SIZE_WORD)
+ if (ft->signal.size == ST_SIZE_16BIT)
{
st_report("driver only supports signed and unsigned samples. Changing to signed.");
ft->signal.encoding = ST_ENCODING_SIGN2;
@@ -561,10 +561,10 @@
!(snd_pcm_format_mask_test(fmask, SND_PCM_FORMAT_S8)))
{
st_report("driver doesn't supported byte samples. Changing to words.");
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
}
}
- else if (ft->signal.size == ST_SIZE_WORD)
+ else if (ft->signal.size == ST_SIZE_16BIT)
{
if (!(snd_pcm_format_mask_test(fmask, SND_PCM_FORMAT_U16)) &&
!(snd_pcm_format_mask_test(fmask, SND_PCM_FORMAT_S16)))
@@ -579,7 +579,7 @@
(snd_pcm_format_mask_test(fmask, SND_PCM_FORMAT_S16)))
{
st_report("driver doesn't supported %s samples. Changing to words.", st_sizes_str[(unsigned char)ft->signal.size]);
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
}
else
{
@@ -630,7 +630,7 @@
break;
}
}
- else if (ft->signal.size == ST_SIZE_WORD) {
+ else if (ft->signal.size == ST_SIZE_16BIT) {
switch (ft->signal.encoding)
{
case ST_ENCODING_SIGN2:
--- a/src/au.c
+++ b/src/au.c
@@ -78,7 +78,7 @@
break;
case SUN_LIN_16:
*encoding = ST_ENCODING_SIGN2;
- *size = ST_SIZE_WORD;
+ *size = ST_SIZE_16BIT;
break;
case SUN_LIN_24:
*encoding = ST_ENCODING_SIGN2;
@@ -86,15 +86,15 @@
break;
case SUN_G721:
*encoding = ST_ENCODING_SIGN2;
- *size = ST_SIZE_WORD;
+ *size = ST_SIZE_16BIT;
break;
case SUN_G723_3:
*encoding = ST_ENCODING_SIGN2;
- *size = ST_SIZE_WORD;
+ *size = ST_SIZE_16BIT;
break;
case SUN_G723_5:
*encoding = ST_ENCODING_SIGN2;
- *size = ST_SIZE_WORD;
+ *size = ST_SIZE_16BIT;
break;
case SUN_FLOAT:
*encoding = ST_ENCODING_FLOAT;
@@ -388,7 +388,7 @@
sun_encoding = SUN_ALAW;
else if (encoding == ST_ENCODING_SIGN2 && size == ST_SIZE_BYTE)
sun_encoding = SUN_LIN_8;
- else if (encoding == ST_ENCODING_SIGN2 && size == ST_SIZE_WORD)
+ else if (encoding == ST_ENCODING_SIGN2 && size == ST_SIZE_16BIT)
sun_encoding = SUN_LIN_16;
else if (encoding == ST_ENCODING_SIGN2 && size == ST_SIZE_24BIT)
sun_encoding = SUN_LIN_24;
--- a/src/avr.c
+++ b/src/avr.c
@@ -90,7 +90,7 @@
ft->signal.size = ST_SIZE_BYTE;
}
else if (avr->rez == 16) {
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
}
else {
st_fail_errno(ft,ST_EFMT,"AVR: unsupported sample resolution");
@@ -184,7 +184,7 @@
if (ft->signal.size == ST_SIZE_BYTE) {
st_writew (ft, 8);
}
- else if (ft->signal.size == ST_SIZE_WORD) {
+ else if (ft->signal.size == ST_SIZE_16BIT) {
st_writew (ft, 16);
}
else {
--- a/src/cdr.c
+++ b/src/cdr.c
@@ -49,7 +49,7 @@
return rc;
ft->signal.rate = 44100L;
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
ft->signal.encoding = ST_ENCODING_SIGN2;
ft->signal.channels = 2;
ft->comment = NULL;
@@ -56,7 +56,7 @@
/* Need length for seeking */
if(ft->seekable){
- ft->length = st_filelength(ft)/ST_SIZE_WORD;
+ ft->length = st_filelength(ft)/ST_SIZE_16BIT;
} else {
ft->length = 0;
}
@@ -100,7 +100,7 @@
cdr->samples = 0;
ft->signal.rate = 44100L;
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
ft->signal.encoding = ST_ENCODING_SIGN2;
ft->signal.channels = 2;
--- a/src/cvsd.c
+++ b/src/cvsd.c
@@ -117,7 +117,7 @@
p->cvsd_rate = (ft->signal.rate <= 24000) ? 16000 : 32000;
ft->signal.rate = 8000;
ft->signal.channels = 1;
- ft->signal.size = ST_SIZE_WORD; /* make output format default to words */
+ ft->signal.size = ST_SIZE_16BIT; /* make output format default to words */
ft->signal.encoding = ST_ENCODING_SIGN2;
/*
* initialize the decoder
--- a/src/flac.c
+++ b/src/flac.c
@@ -331,7 +331,7 @@
/* FIXME: FLAC should not need to know about this oddity */
if (format->signal.encoding < ST_ENCODING_SIZE_IS_WORD)
- format->signal.size = ST_SIZE_WORD;
+ format->signal.size = ST_SIZE_16BIT;
encoder->bits_per_sample = (format->signal.size > 4 ? 4 : format->signal.size) << 3;
--- a/src/mask.c
+++ b/src/mask.c
@@ -59,12 +59,12 @@
} else if (effp->outinfo.size == ST_SIZE_BYTE) {
mask->amount *= 256;
return ST_SUCCESS;
- } else if (effp->outinfo.size == ST_SIZE_WORD)
+ } else if (effp->outinfo.size == ST_SIZE_16BIT)
return ST_SUCCESS;
else if (effp->outinfo.size == ST_SIZE_24BIT) {
mask->amount /= 256;
return ST_SUCCESS;
- } else if (effp->outinfo.size == ST_SIZE_DDWORD) {
+ } else if (effp->outinfo.size == ST_SIZE_64BIT) {
mask->amount /= 16384;
return ST_SUCCESS;
}
--- a/src/maud.c
+++ b/src/maud.c
@@ -148,7 +148,7 @@
ft->signal.encoding = ST_ENCODING_ULAW;
}
else if (bitpersam == 16 && chaninf == 0) {
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
ft->signal.encoding = ST_ENCODING_SIGN2;
}
else
@@ -219,7 +219,7 @@
st_fail_errno(ft,ST_EFMT,"MAUD: unsupported number of channels, unable to store");
return(ST_EOF);
}
- if (ft->signal.size == ST_SIZE_WORD) ft->signal.encoding = ST_ENCODING_SIGN2;
+ if (ft->signal.size == ST_SIZE_16BIT) ft->signal.encoding = ST_ENCODING_SIGN2;
if (ft->signal.encoding == ST_ENCODING_ULAW ||
ft->signal.encoding == ST_ENCODING_ALAW) ft->signal.size = ST_SIZE_BYTE;
if (ft->signal.size == ST_SIZE_BYTE &&
--- a/src/mp3.c
+++ b/src/mp3.c
@@ -182,7 +182,7 @@
mad_timer_reset(p->Timer);
ft->signal.encoding = ST_ENCODING_MP3;
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
/* Decode at least one valid frame to find out the input
* format. The decoded frame will be saved off so that it
--- a/src/nulfile.c
+++ b/src/nulfile.c
@@ -23,7 +23,7 @@
* (but commonly used) defaults: */
if (ft->signal.rate == 0) ft->signal.rate = 44100;
if (ft->signal.channels == 0) ft->signal.channels = 2;
- if (ft->signal.size ==-1) ft->signal.size = ST_SIZE_WORD;
+ if (ft->signal.size ==-1) ft->signal.size = ST_SIZE_16BIT;
if (ft->signal.encoding == ST_ENCODING_UNKNOWN) ft->signal.encoding = ST_ENCODING_SIGN2;
return ST_SUCCESS;
--- a/src/oss.c
+++ b/src/oss.c
@@ -61,7 +61,7 @@
ft->signal.encoding = ST_ENCODING_UNSIGNED;
}
}
- else if (ft->signal.size == ST_SIZE_WORD) {
+ else if (ft->signal.size == ST_SIZE_16BIT) {
sampletype = (ST_IS_BIGENDIAN) ? AFMT_S16_BE : AFMT_S16_LE;
samplesize = 16;
if (ft->signal.encoding == ST_ENCODING_UNKNOWN)
@@ -75,7 +75,7 @@
else {
sampletype = (ST_IS_BIGENDIAN) ? AFMT_S16_BE : AFMT_S16_LE;
samplesize = 16;
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
ft->signal.encoding = ST_ENCODING_SIGN2;
st_report("OSS driver only supports bytes and words");
st_report("Forcing to signed linear word");
@@ -110,7 +110,7 @@
/* is 8-bit supported */
else if (samplesize == 8 && (tmp & AFMT_U8) == 0)
{
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
ft->signal.encoding = ST_ENCODING_SIGN2;
st_report("OSS driver doesn't like unsigned bytes");
st_report("Forcing to signed words");
--- a/src/raw.c
+++ b/src/raw.c
@@ -27,10 +27,10 @@
switch(ft->signal.size) {
case ST_SIZE_BYTE:
- case ST_SIZE_WORD:
+ case ST_SIZE_16BIT:
case ST_SIZE_24BIT:
- case ST_SIZE_DWORD:
- case ST_SIZE_DDWORD:
+ case ST_SIZE_32BIT:
+ case ST_SIZE_64BIT:
break;
default:
st_fail_errno(ft,ST_ENOTSUP,"Can't seek this data size");
@@ -168,7 +168,7 @@
}
break;
- case ST_SIZE_WORD:
+ case ST_SIZE_16BIT:
switch (ft->signal.encoding) {
case ST_ENCODING_SIGN2:
return write ? st_sw_write_buf : st_sw_read_buf;
@@ -190,7 +190,7 @@
}
break;
- case ST_SIZE_DWORD:
+ case ST_SIZE_32BIT:
switch (ft->signal.encoding) {
case ST_ENCODING_SIGN2:
return write ? st_sdw_write_buf : st_sdw_read_buf;
@@ -203,7 +203,7 @@
}
break;
- case ST_SIZE_DDWORD:
+ case ST_SIZE_64BIT:
switch (ft->signal.encoding) {
case ST_ENCODING_FLOAT:
return write ? st_sudf_write_buf : st_sudf_read_buf;
@@ -284,15 +284,15 @@
return &driver; \
}
-RAW_FORMAT(sb,NULL ,NULL ,BYTE ,DEFAULT,SIGN2)
-RAW_FORMAT(sl,NULL ,NULL ,DWORD,DEFAULT,SIGN2)
-RAW_FORMAT(s3,NULL ,NULL ,24BIT,DEFAULT,SIGN2)
-RAW_FORMAT(sw,NULL ,NULL ,WORD ,DEFAULT,SIGN2)
+RAW_FORMAT(sb,NULL ,NULL ,BYTE , DEFAULT,SIGN2)
+RAW_FORMAT(sl,NULL ,NULL ,32BIT, DEFAULT,SIGN2)
+RAW_FORMAT(s3,NULL ,NULL ,24BIT, DEFAULT,SIGN2)
+RAW_FORMAT(sw,NULL ,NULL ,16BIT, DEFAULT,SIGN2)
-RAW_FORMAT(ub,"sou","fssd",BYTE ,DEFAULT,UNSIGNED)
-RAW_FORMAT(uw,NULL ,NULL ,WORD ,DEFAULT,UNSIGNED)
-RAW_FORMAT(u3,NULL ,NULL ,24BIT,DEFAULT,UNSIGNED)
-RAW_FORMAT(u4,NULL ,NULL ,DWORD,DEFAULT,UNSIGNED)
+RAW_FORMAT(ub,"sou","fssd",BYTE , DEFAULT,UNSIGNED)
+RAW_FORMAT(uw,NULL ,NULL ,16BIT, DEFAULT,UNSIGNED)
+RAW_FORMAT(u3,NULL ,NULL ,24BIT, DEFAULT,UNSIGNED)
+RAW_FORMAT(u4,NULL ,NULL ,32BIT, DEFAULT,UNSIGNED)
RAW_FORMAT(al,NULL ,NULL ,BYTE ,NO ,ALAW)
RAW_FORMAT(ul,NULL ,NULL ,BYTE ,NO ,ULAW)
--- a/src/sf.c
+++ b/src/sf.c
@@ -122,12 +122,12 @@
ft->signal.rate = sf->info.sf_srate;
switch(sf->info.sf_packmode) {
case SF_SHORT:
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
ft->signal.encoding = ST_ENCODING_SIGN2;
samplesize = ft->signal.size;
break;
case SF_FLOAT:
- ft->signal.size = ST_SIZE_DWORD;
+ ft->signal.size = ST_SIZE_32BIT;
ft->signal.encoding = ST_ENCODING_FLOAT;
samplesize = sizeof(float);
break;
@@ -182,13 +182,13 @@
sf->info.magic_union._magic_bytes.sf_machine = SF_SUN;
sf->info.sf_srate = ft->signal.rate;
- if (ft->signal.size == ST_SIZE_DWORD &&
+ if (ft->signal.size == ST_SIZE_32BIT &&
ft->signal.encoding == ST_ENCODING_FLOAT) {
sf->info.sf_packmode = SF_FLOAT;
} else {
sf->info.sf_packmode = SF_SHORT;
/* Default to signed words */
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
ft->signal.encoding = ST_ENCODING_SIGN2;
}
--- a/src/silence.c
+++ b/src/silence.c
@@ -305,7 +305,7 @@
value = ST_SAMPLE_TO_SIGNED_BYTE(value, dummy_clipped_count);
ratio = (double)abs(value) / (double)ST_INT8_MAX;
break;
- case ST_SIZE_WORD:
+ case ST_SIZE_16BIT:
value = ST_SAMPLE_TO_SIGNED_WORD(value, dummy_clipped_count);
ratio = (double)abs(value) / (double)ST_INT16_MAX;
break;
@@ -313,7 +313,7 @@
value = ST_SAMPLE_TO_SIGNED_24BIT(value, dummy_clipped_count);
ratio = (double)abs(value) / (double)ST_INT24_MAX;
break;
- case ST_SIZE_DWORD:
+ case ST_SIZE_32BIT:
value = ST_SAMPLE_TO_SIGNED_DWORD(value,);
ratio = (double)labs(value) / (double)ST_INT32_MAX;
break;
--- a/src/smp.c
+++ b/src/smp.c
@@ -273,7 +273,7 @@
}
ft->signal.rate = (int) trailer.rate;
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
ft->signal.encoding = ST_ENCODING_SIGN2;
ft->signal.channels = 1;
smp->dataStart = samplestart;
@@ -346,7 +346,7 @@
}
/* If your format specifies any of the following info. */
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
ft->signal.encoding = ST_ENCODING_SIGN2;
ft->signal.channels = 1;
--- a/src/sox.c
+++ b/src/sox.c
@@ -579,10 +579,10 @@
break;
case '1': case 'b': fi->signal.size = ST_SIZE_BYTE; break;
- case '2': case 'w': fi->signal.size = ST_SIZE_WORD; break;
+ case '2': case 'w': fi->signal.size = ST_SIZE_16BIT; break;
case '3': fi->signal.size = ST_SIZE_24BIT; break;
- case '4': case 'l': fi->signal.size = ST_SIZE_DWORD; break;
- case '8': case 'd': fi->signal.size = ST_SIZE_DDWORD; break;
+ case '4': case 'l': fi->signal.size = ST_SIZE_32BIT; break;
+ case '8': case 'd': fi->signal.size = ST_SIZE_64BIT; break;
case 's': fi->signal.encoding = ST_ENCODING_SIGN2; break;
case 'u': fi->signal.encoding = ST_ENCODING_UNSIGNED; break;
@@ -1642,9 +1642,7 @@
"-B/-L force endian type to big/little\n"
"-s/-u/-U/-A/ sample encoding: signed/unsigned/u-law/A-law\n"
" -a/-i/-g/-f ADPCM/IMA_ADPCM/GSM/floating point\n"
-
"-1/-2/-3/-4/-8 sample size in bytes\n"
- "-b/-w/-l/-d aliases for -1/-2/-4/-8 (byte, word, long, double-long)\n"
"-v volume input file volume adjustment factor (real number)\n"
"\n");
--- a/src/st.h
+++ b/src/st.h
@@ -331,12 +331,9 @@
/* Size field */
#define ST_SIZE_BYTE 1
#define ST_SIZE_8BIT 1
-#define ST_SIZE_WORD 2
#define ST_SIZE_16BIT 2
#define ST_SIZE_24BIT 3
-#define ST_SIZE_DWORD 4
#define ST_SIZE_32BIT 4
-#define ST_SIZE_DDWORD 8
#define ST_SIZE_64BIT 8
#define ST_INFO_SIZE_MAX 8
--- a/src/sunaudio.c
+++ b/src/sunaudio.c
@@ -90,7 +90,7 @@
ft->signal.encoding = ST_ENCODING_ULAW;
}
}
- else if (ft->signal.size == ST_SIZE_WORD)
+ else if (ft->signal.size == ST_SIZE_16BIT)
{
st_report("Warning: Detected simple hardware. Forcing output to ULAW");
ft->signal.size = ST_SIZE_BYTE;
@@ -114,7 +114,7 @@
ft->signal.channels = 1;
}
}
- else if (ft->signal.size == ST_SIZE_WORD) {
+ else if (ft->signal.size == ST_SIZE_16BIT) {
samplesize = 16;
if (ft->signal.encoding != ST_ENCODING_SIGN2) {
st_fail_errno(ft,ST_EFMT,"Sun audio driver only supports signed linear for words.");
@@ -222,7 +222,7 @@
ft->signal.encoding = ST_ENCODING_ULAW;
}
}
- else if (ft->signal.size == ST_SIZE_WORD)
+ else if (ft->signal.size == ST_SIZE_16BIT)
{
st_report("Warning: Detected simple hardware. Forcing output to ULAW");
ft->signal.size = ST_SIZE_BYTE;
@@ -254,7 +254,7 @@
}
}
- else if (ft->signal.size == ST_SIZE_WORD) {
+ else if (ft->signal.size == ST_SIZE_16BIT) {
samplesize = 16;
if (ft->signal.encoding != ST_ENCODING_SIGN2) {
st_report("Sun Audio driver only supports Signed Linear for words.");
@@ -264,7 +264,7 @@
}
else {
st_report("Sun Audio driver only supports bytes and words");
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
samplesize = 16;
}
--- a/src/tx16w.c
+++ b/src/tx16w.c
@@ -173,7 +173,7 @@
st_debug("Sample rate = %ld",ft->signal.rate);
ft->signal.channels = 1 ; /* not sure about stereo sample data yet ??? */
- ft->signal.size = ST_SIZE_WORD; /* this is close enough */
+ ft->signal.size = ST_SIZE_16BIT; /* this is close enough */
ft->signal.encoding = ST_ENCODING_SIGN2;
return(ST_SUCCESS);
@@ -247,9 +247,9 @@
if (ft->signal.channels != 1)
st_report("tx16w is overriding output format to 1 channel.");
ft->signal.channels = 1 ; /* not sure about stereo sample data yet ??? */
- if (ft->signal.size != ST_SIZE_WORD || ft->signal.encoding != ST_ENCODING_SIGN2)
+ if (ft->signal.size != ST_SIZE_16BIT || ft->signal.encoding != ST_ENCODING_SIGN2)
st_report("tx16w is overriding output format to size Signed Word format.");
- ft->signal.size = ST_SIZE_WORD; /* this is close enough */
+ ft->signal.size = ST_SIZE_16BIT; /* this is close enough */
ft->signal.encoding = ST_ENCODING_SIGN2;
/* If you have to seek around the output file */
--- a/src/voc.c
+++ b/src/voc.c
@@ -376,7 +376,7 @@
*buf++ = ST_UNSIGNED_BYTE_TO_SAMPLE(uc,);
}
break;
- case ST_SIZE_WORD:
+ case ST_SIZE_16BIT:
st_readw(ft, (unsigned short *)&sw);
if (st_eof(ft))
{
@@ -613,7 +613,7 @@
switch (uc)
{
case 8: v->size = ST_SIZE_BYTE; break;
- case 16: v->size = ST_SIZE_WORD; break;
+ case 16: v->size = ST_SIZE_16BIT; break;
default:
st_fail_errno(ft,ST_EFMT,
"Don't understand size %d", uc);
--- a/src/vox.c
+++ b/src/vox.c
@@ -73,7 +73,7 @@
adpcm_init(&state->encoder, 1);
ft->signal.channels = 1;
- return st_rawstart(ft, true, false, ST_ENCODING_OKI_ADPCM, ST_SIZE_WORD, ST_OPTION_DEFAULT);
+ return st_rawstart(ft, true, false, ST_ENCODING_OKI_ADPCM, ST_SIZE_16BIT, ST_OPTION_DEFAULT);
}
@@ -92,7 +92,7 @@
adpcm_init(&state->encoder, 0);
ft->signal.channels = 1;
- return st_rawstart(ft, true, false, ST_ENCODING_IMA_ADPCM, ST_SIZE_WORD, ST_OPTION_DEFAULT);
+ return st_rawstart(ft, true, false, ST_ENCODING_IMA_ADPCM, ST_SIZE_16BIT, ST_OPTION_DEFAULT);
}
--- a/src/wav.c
+++ b/src/wav.c
@@ -684,7 +684,7 @@
if (errct) st_warn("base iCoefs differ in %d/14 positions",errct);
}
- bytespersample = ST_SIZE_WORD; /* AFTER de-compression */
+ bytespersample = ST_SIZE_16BIT; /* AFTER de-compression */
break;
case WAVE_FORMAT_IMA_ADPCM:
@@ -715,7 +715,7 @@
wav->samples = (short *)xmalloc(wChannels*wav->samplesPerBlock*sizeof(short));
- bytespersample = ST_SIZE_WORD; /* AFTER de-compression */
+ bytespersample = ST_SIZE_16BIT; /* AFTER de-compression */
break;
/* GSM formats have extended fmt chunk. Check for those cases. */
@@ -740,7 +740,7 @@
wav_format_str(wav->formatTag), wav->samplesPerBlock, 320);
return ST_EOF;
}
- bytespersample = ST_SIZE_WORD; /* AFTER de-compression */
+ bytespersample = ST_SIZE_16BIT; /* AFTER de-compression */
len -= 2;
break;
@@ -764,9 +764,9 @@
ft->signal.encoding = ST_ENCODING_UNSIGNED;
break;
- case ST_SIZE_WORD:
- if (ft->signal.size == -1 || ft->signal.size == ST_SIZE_WORD)
- ft->signal.size = ST_SIZE_WORD;
+ case ST_SIZE_16BIT:
+ if (ft->signal.size == -1 || ft->signal.size == ST_SIZE_16BIT)
+ ft->signal.size = ST_SIZE_16BIT;
else
st_warn("User options overriding size read in .wav header");
@@ -786,9 +786,9 @@
ft->signal.encoding = ST_ENCODING_SIGN2;
break;
- case ST_SIZE_DWORD:
- if (ft->signal.size == -1 || ft->signal.size == ST_SIZE_DWORD)
- ft->signal.size = ST_SIZE_DWORD;
+ case ST_SIZE_32BIT:
+ if (ft->signal.size == -1 || ft->signal.size == ST_SIZE_32BIT)
+ ft->signal.size = ST_SIZE_32BIT;
else
st_warn("User options overriding size read in .wav header");
@@ -1311,7 +1311,7 @@
ft->signal.encoding = ST_ENCODING_UNSIGNED;
}
break;
- case ST_SIZE_WORD:
+ case ST_SIZE_16BIT:
wBitsPerSample = 16;
if (ft->signal.encoding != ST_ENCODING_SIGN2)
{
@@ -1328,7 +1328,7 @@
}
break;
- case ST_SIZE_DWORD:
+ case ST_SIZE_32BIT:
wBitsPerSample = 32;
if (ft->signal.encoding != ST_ENCODING_SIGN2 &&
ft->signal.encoding != ST_ENCODING_FLOAT)
@@ -1341,7 +1341,7 @@
default:
st_report("Do not support %s in WAV files. Forcing to Signed Words.",st_sizes_str[(unsigned char)ft->signal.size]);
ft->signal.encoding = ST_ENCODING_SIGN2;
- ft->signal.size = ST_SIZE_WORD;
+ ft->signal.size = ST_SIZE_16BIT;
wBitsPerSample = 16;
break;
}