SDL: Add warning if "waveout" driver is being used for audio.

This will help avoid bug reports like #6510 - "SDL: Audio delay
in daily builds" in future.
This commit is contained in:
D G Turner 2014-02-14 15:34:22 +00:00
parent 6d38d25af3
commit c5e7aa8e93

View file

@ -63,6 +63,10 @@ void SdlMixerManager::init() {
sdlDriverName[0] = '\0';
SDL_AudioDriverName(sdlDriverName, maxNameLen);
debug(1, "Using SDL Audio Driver \"%s\"", sdlDriverName);
// Warning if SDL on Windows is using the fallback waveout driver, rather than the nominal DX DirectSound driver, which can cause issues with audio.
if (strcmp(sdlDriverName, "waveout") == 0)
warning("Using the fallback \"waveout\" SDL audio driver instead of \"dsound\" can cause audio lag. Fix your DirectX setup and/or SDL.dll to avoid this.");
// Get the desired audio specs
SDL_AudioSpec desired = getAudioSpec(SAMPLES_PER_SEC);