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/mixer/sdl/sdl-mixer.cpp') 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 From c5e7aa8e93cbc1bea8442ac88a4e6db9873763e2 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 14 Feb 2014 15:34:22 +0000 Subject: 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. --- backends/mixer/sdl/sdl-mixer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backends/mixer/sdl/sdl-mixer.cpp') diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp index cebeac23bc..c5c717f75c 100644 --- a/backends/mixer/sdl/sdl-mixer.cpp +++ b/backends/mixer/sdl/sdl-mixer.cpp @@ -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); -- cgit v1.2.3 From a5f0cd06e648765791828b8f2dc90880621182f2 Mon Sep 17 00:00:00 2001 From: Kirben Date: Mon, 17 Feb 2014 11:36:53 +1100 Subject: SDL: Revert add warning if "waveout" driver is being used for audio. This situation was only caused by a buildbot issue, and the relevant information has been added to the FAQ on the ScummVM web site. --- backends/mixer/sdl/sdl-mixer.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'backends/mixer/sdl/sdl-mixer.cpp') diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp index c5c717f75c..8e411f2580 100644 --- a/backends/mixer/sdl/sdl-mixer.cpp +++ b/backends/mixer/sdl/sdl-mixer.cpp @@ -64,10 +64,6 @@ void SdlMixerManager::init() { 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); -- cgit v1.2.3 From 63304ee9ec4bf37cc96949f32f5c8dd53a6d3cc4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Feb 2014 02:34:24 +0100 Subject: SDL: Make GPL headers consistent in themselves. --- backends/mixer/sdl/sdl-mixer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/mixer/sdl/sdl-mixer.cpp') diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp index 8e411f2580..7c709e91a3 100644 --- a/backends/mixer/sdl/sdl-mixer.cpp +++ b/backends/mixer/sdl/sdl-mixer.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- cgit v1.2.3