From 9cdcbe0e932b97fac88a6195f87647159a6c7194 Mon Sep 17 00:00:00 2001 From: Peter Suti Date: Wed, 20 Mar 2024 09:40:21 +0100 Subject: [PATCH] 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 --- aplay/aplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;