From: Peter Suti Date: Wed, 20 Mar 2024 08:40:21 +0000 (+0100) Subject: aplay: fix S24_LE wav header X-Git-Tag: v1.2.12~6 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=9cdcbe0e932b97fac88a6195f87647159a6c7194;p=alsa-utils.git 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 Signed-off-by: Jaroslav Kysela --- diff --git a/aplay/aplay.c b/aplay/aplay.c index 6c5a07e..5bead5b 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -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;