wasapi: Force enumerated audio devices to report themselves as float32 format.

This is what they'll end up being when used through WASAPI in shared mode,
regardless of what the hardware actually expects.

Reference Issue #12914.
This commit is contained in:
Ryan C. Gordon committed 2025-07-11 16:10:47 -04:00
1 parent 92e8224d32
commit a81cf566f4
4 files changed
+16 -12

No files matched your search

+1 -1
View File
@@ -206,7 +206,7 @@ static void DSOUND_DetectDevices(SDL_AudioDevice **default_playback, SDL_AudioDe
{
#ifdef HAVE_MMDEVICEAPI_H
if (SupportsIMMDevice) {
SDL_IMMDevice_EnumerateEndpoints(default_playback, default_recording);
SDL_IMMDevice_EnumerateEndpoints(default_playback, default_recording, SDL_AUDIO_UNKNOWN);
} else
#endif
{
+1 -1
View File
@@ -337,7 +337,7 @@ typedef struct
static bool mgmtthrtask_DetectDevices(void *userdata)
{
mgmtthrtask_DetectDevicesData *data = (mgmtthrtask_DetectDevicesData *)userdata;
SDL_IMMDevice_EnumerateEndpoints(data->default_playback, data->default_recording);
SDL_IMMDevice_EnumerateEndpoints(data->default_playback, data->default_recording, SDL_AUDIO_F32);
return true;
}