From a4ad32c5d9d4a09765c8441b7296a0aefe66d327 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 12 Feb 2014 11:36:56 +0000 Subject: 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. --- backends/mixer/sdl/sdl-mixer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backends') 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); -- cgit v1.2.3