mirror of
https://github.com/alsa-project/alsa-utils
synced 2025-01-03 17:29:46 +01:00
ADPCM & special formats..
This commit is contained in:
parent
96a2ea5e8c
commit
924b1d976a
1 changed files with 8 additions and 2 deletions
|
@ -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':
|
||||||
|
|
Loading…
Reference in a new issue