mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 18:05:42 +01:00
Added -f cdr
This commit is contained in:
parent
cab4c16d51
commit
09982b15d7
1 changed files with 6 additions and 2 deletions
|
@ -174,6 +174,7 @@ static void usage(char *command)
|
|||
fprintf(stderr, "\nSome of these may not be available on selected hardware\n");
|
||||
fprintf(stderr, "The availabled format shortcuts are:\n");
|
||||
fprintf(stderr, "-f cd (16 bit little endian, 44100, stereo)\n");
|
||||
fprintf(stderr, "-f cdr (16 bit big endian, 44100, stereo)\n");
|
||||
fprintf(stderr, "-f dat (16 bit little endian, 48000, stereo)\n");
|
||||
}
|
||||
|
||||
|
@ -389,8 +390,11 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
break;
|
||||
case 'f':
|
||||
if (strcasecmp(optarg, "cd") == 0) {
|
||||
rhwparams.format = file_type == FORMAT_AU ? SND_PCM_FORMAT_S16_BE : SND_PCM_FORMAT_S16_LE;
|
||||
if (strcasecmp(optarg, "cd") == 0 || strcasecmp(optarg, "cdr") == 0) {
|
||||
if (strcasecmp(optarg, "cdr") == 0)
|
||||
rhwparams.format = SND_PCM_FORMAT_S16_BE;
|
||||
else
|
||||
rhwparams.format = file_type == FORMAT_AU ? SND_PCM_FORMAT_S16_BE : SND_PCM_FORMAT_S16_LE;
|
||||
rhwparams.rate = 44100;
|
||||
rhwparams.channels = 2;
|
||||
} else if (strcasecmp(optarg, "dat") == 0) {
|
||||
|
|
Loading…
Reference in a new issue