mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:25:43 +01:00
Redo wrong changes by Takashi
This commit is contained in:
parent
e8fd94060e
commit
bc9fc7595a
1 changed files with 4 additions and 3 deletions
|
@ -654,7 +654,7 @@ static ssize_t test_wavefile(int fd, char *_buffer, size_t size)
|
||||||
hwparams.format = SND_PCM_FORMAT_S16_LE;
|
hwparams.format = SND_PCM_FORMAT_S16_LE;
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
switch (LE_SHORT(f->byte_p_spl)) {
|
switch (LE_SHORT(f->byte_p_spl) / hwparams.channels) {
|
||||||
case 3:
|
case 3:
|
||||||
hwparams.format = SND_PCM_FORMAT_S24_3LE;
|
hwparams.format = SND_PCM_FORMAT_S24_3LE;
|
||||||
break;
|
break;
|
||||||
|
@ -662,9 +662,10 @@ static ssize_t test_wavefile(int fd, char *_buffer, size_t size)
|
||||||
hwparams.format = SND_PCM_FORMAT_S24_LE;
|
hwparams.format = SND_PCM_FORMAT_S24_LE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error(" can't play WAVE-files with sample %d bits in %d bytes wide", LE_SHORT(f->bit_p_spl), LE_SHORT(f->byte_p_spl));
|
error(" can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)", LE_SHORT(f->bit_p_spl), LE_SHORT(f->byte_p_spl), hwparams.channels);
|
||||||
break;
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
hwparams.format = SND_PCM_FORMAT_S32_LE;
|
hwparams.format = SND_PCM_FORMAT_S32_LE;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue