aplay: fix S24_LE wav header

S24_LE is 32 bits in width storing 24 bits of data and 8 bits of padding
So wav header needs to be 32 bits not 24

Closes: https://github.com/alsa-project/alsa-utils/pull/260
Signed-off-by: Peter Suti <peter.suti@streamunlimited.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Peter Suti 2024-03-20 09:40:21 +01:00 committed by Jaroslav Kysela
parent 906a56f9ff
commit 9cdcbe0e93

View file

@ -2719,11 +2719,11 @@ static void begin_wave(int fd, size_t cnt)
case SND_PCM_FORMAT_S16_LE:
bits = 16;
break;
case SND_PCM_FORMAT_S24_LE: /* S24_LE is 24 bits stored in 32 bit width with 8 bit padding */
case SND_PCM_FORMAT_S32_LE:
case SND_PCM_FORMAT_FLOAT_LE:
case SND_PCM_FORMAT_FLOAT_LE:
bits = 32;
break;
case SND_PCM_FORMAT_S24_LE:
case SND_PCM_FORMAT_S24_3LE:
bits = 24;
break;