sdl2-compat: audio: Fix incorrect assignment of channel count

From 2508ca206ddc54fc4a78ad8d67bad1bb639a57db Mon Sep 17 00:00:00 2001
From: Cameron Gutman <[EMAIL REDACTED]>
Date: Sun, 23 Feb 2025 18:12:16 -0600
Subject: [PATCH] audio: Fix incorrect assignment of channel count

This is currently dead code, but it might as well be correct.
---
 src/sdl2_compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 25ace49..cb5375c 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -6814,7 +6814,7 @@ static SDL_AudioDeviceID OpenAudioDeviceLocked(const char *devicename, int iscap
         obtained2->format = (SDL2_AudioFormat)spec3.format;
     }
     if ((spec3.channels != obtained2->channels) && (allowed_changes & SDL2_AUDIO_ALLOW_CHANNELS_CHANGE)) {
-        obtained2->freq = spec3.channels;
+        obtained2->channels = spec3.channels;
     }
     if ((spec3.freq != obtained2->freq) && (allowed_changes & SDL2_AUDIO_ALLOW_FREQUENCY_CHANGE)) {
         obtained2->freq = spec3.freq;