diff options
author | D G Turner | 2014-02-12 11:36:56 +0000 |
---|---|---|
committer | D G Turner | 2014-02-12 12:08:47 +0000 |
commit | a4ad32c5d9d4a09765c8441b7296a0aefe66d327 (patch) | |
tree | 240a47c4a4d50eaf13532e104f0aef86f4c4a855 /backends/mixer | |
parent | a456295cbdac8fc0921b013f50df2ad4eb02ac8a (diff) | |
download | scummvm-rg350-a4ad32c5d9d4a09765c8441b7296a0aefe66d327.tar.gz scummvm-rg350-a4ad32c5d9d4a09765c8441b7296a0aefe66d327.tar.bz2 scummvm-rg350-a4ad32c5d9d4a09765c8441b7296a0aefe66d327.zip |
SDL: Add debugging code to output SDL audio driver name being used.
This is to aid with investigation of bug #6510 - "SDL: Audio delay in
daily builds" and similar future issues.
Diffstat (limited to 'backends/mixer')
-rw-r--r-- | backends/mixer/sdl/sdl-mixer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp index 3c79290b50..cebeac23bc 100644 --- a/backends/mixer/sdl/sdl-mixer.cpp +++ b/backends/mixer/sdl/sdl-mixer.cpp @@ -58,6 +58,12 @@ void SdlMixerManager::init() { error("Could not initialize SDL: %s", SDL_GetError()); } + const int maxNameLen = 20; + char sdlDriverName[maxNameLen]; + sdlDriverName[0] = '\0'; + SDL_AudioDriverName(sdlDriverName, maxNameLen); + debug(1, "Using SDL Audio Driver \"%s\"", sdlDriverName); + // Get the desired audio specs SDL_AudioSpec desired = getAudioSpec(SAMPLES_PER_SEC); |