Skip to content

Commit

Permalink
SDL: Add debugging code to output SDL audio driver name being used.
Browse files Browse the repository at this point in the history
This is to aid with investigation of bug #6510 - "SDL: Audio delay in
daily builds" and similar future issues.
  • Loading branch information
digitall committed Feb 12, 2014
1 parent a456295 commit a4ad32c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backends/mixer/sdl/sdl-mixer.cpp
Expand Up @@ -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);

Expand Down

0 comments on commit a4ad32c

Please sign in to comment.