From ab5541ec5d4377dcc20a701897437f07ba71566f Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 13 Oct 2026 12:34:34 -0400
Subject: [PATCH] audio: Make sure to set `device->spec` before actually
opening the device.
This was a regression introduced in 36fed09edb7b8fd8eb808769c6896309ee6c36ec.
(slouken actually caught this one, but I'm committing the fix.)
---
src/audio/SDL_audio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 905438ed45857..242595c50083e 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -1932,6 +1932,7 @@ static bool OpenPhysicalAudioDevice(SDL_AudioDevice *device, const SDL_AudioSpec
return true; // carry on with the reconfigured device!
}
+ SDL_copyp(&device->spec, &spec); // this is what current_audio.impl.OpenDevice() will use for the requested format. !!! FIXME: maybe we should move this to a param instead of changing state, though.
// These start with the backend's implementation, but we might swap them out with zombie versions later.
device->WaitDevice = current_audio.impl.WaitDevice;