From 024c35c1fec03f32a1f752c8c60896f1790d2b0d Mon Sep 17 00:00:00 2001 From: "Skyth (Asilkan)" <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Fri, 7 Mar 2025 13:52:01 +0300 Subject: [PATCH] Force WASAPI on Windows. (#1134) --- UnleashedRecomp/apu/driver/sdl2_driver.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UnleashedRecomp/apu/driver/sdl2_driver.cpp b/UnleashedRecomp/apu/driver/sdl2_driver.cpp index f487620a..787fab3d 100644 --- a/UnleashedRecomp/apu/driver/sdl2_driver.cpp +++ b/UnleashedRecomp/apu/driver/sdl2_driver.cpp @@ -38,6 +38,11 @@ static void CreateAudioDevice() void XAudioInitializeSystem() { +#ifdef _WIN32 + // Force wasapi on Windows. + SDL_setenv("SDL_AUDIODRIVER", "wasapi", true); +#endif + SDL_SetHint(SDL_HINT_AUDIO_CATEGORY, "playback"); SDL_SetHint(SDL_HINT_AUDIO_DEVICE_APP_NAME, "Unleashed Recompiled");