Force WASAPI on Windows. (#1134)

This commit is contained in:
Skyth (Asilkan) 2025-03-07 13:52:01 +03:00 committed by GitHub
parent a9e280e116
commit 024c35c1fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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");