SDL_mixer: wav: byteswap channel count when calculating a standard channel mask.

From 651c010373868ad9074da61479eb5a309efa189b Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 10 Mar 2026 16:54:17 -0400
Subject: [PATCH] wav: byteswap channel count when calculating a standard
 channel mask.

Reference Issue #827.
---
 src/decoder_wav.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/decoder_wav.c b/src/decoder_wav.c
index 7ca3b037..52fe415f 100644
--- a/src/decoder_wav.c
+++ b/src/decoder_wav.c
@@ -874,7 +874,7 @@ static bool ParseFMT(WAV_AudioData *adata, SDL_IOStream *io, SDL_AudioSpec *spec
         adata->encoding = (Uint16)SDL_Swap32LE(fmt.subencoding);
         adata->channelmask = SDL_Swap32LE(fmt.channelsmask);
     } else {
-        adata->channelmask = StandardSDLWavChannelMask(fmt.format.channels);
+        adata->channelmask = StandardSDLWavChannelMask((int) SDL_Swap16LE(fmt.format.channels));
     }
 
     // Decode the audio data format