ADPCM & special formats..

This commit is contained in:
Jaroslav Kysela 1999-11-28 18:04:29 +00:00
parent 96a2ea5e8c
commit 924b1d976a

View file

@ -137,6 +137,8 @@ static char *get_format(int format)
"MPEG", "MPEG",
"GSM" "GSM"
}; };
if (format == SND_PCM_SFMT_SPECIAL)
return "Special";
if (format < 0 || format > SND_PCM_SFMT_GSM) if (format < 0 || format > SND_PCM_SFMT_GSM)
return "Unknown"; return "Unknown";
return formats[format]; return formats[format];
@ -379,12 +381,16 @@ int main(int argc, char *argv[])
rformat.format = SND_PCM_SFMT_MU_LAW; rformat.format = SND_PCM_SFMT_MU_LAW;
active_format = FORMAT_RAW; active_format = FORMAT_RAW;
break; break;
} } else if (!strcmp(optarg, "adpcm")) {
if (!strcmp(optarg, "adpcm")) {
rformat.format = SND_PCM_SFMT_IMA_ADPCM; rformat.format = SND_PCM_SFMT_IMA_ADPCM;
active_format = FORMAT_RAW; active_format = FORMAT_RAW;
break; break;
} }
if (!strcmp(optarg, "special")) {
rformat.format = SND_PCM_SFMT_SPECIAL;
active_format = FORMAT_RAW;
break;
}
fprintf(stderr, "Error: wrong extended format '%s'\n", optarg); fprintf(stderr, "Error: wrong extended format '%s'\n", optarg);
return 1; return 1;
case 'm': case 'm':