SDL: Fix SDL_SetAudioStreamFormat incorrectly blocking changes on bound streams

From 449b0229ebf83e099e15d0067ba87c2b67073ff7 Mon Sep 17 00:00:00 2001
From: Brick <[EMAIL REDACTED]>
Date: Tue, 26 Mar 2024 16:04:25 +0000
Subject: [PATCH] Fix SDL_SetAudioStreamFormat incorrectly blocking changes on
 bound streams

We want to avoid changes to the end used by the device, so src for capture and dst for output
---
 src/audio/SDL_audiocvt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c
index 77dc4df238b95..57e33e6f51321 100644
--- a/src/audio/SDL_audiocvt.c
+++ b/src/audio/SDL_audiocvt.c
@@ -558,9 +558,9 @@ int SDL_SetAudioStreamFormat(SDL_AudioStream *stream, const SDL_AudioSpec *src_s
     // quietly refuse to change the format of the end currently bound to a device.
     if (stream->bound_device) {
         if (stream->bound_device->physical_device->iscapture) {
-            dst_spec = NULL;
-        } else {
             src_spec = NULL;
+        } else {
+            dst_spec = NULL;
         }
     }