From 84dd35ba2366775049841554bfb9b48edb392889 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 14 Nov 2003 05:55:48 +0000 Subject: [PATCH] Don't fall back on OSS if ALSA is in use. --- stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp index 5d511085ef..3cf095e5ee 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp @@ -169,6 +169,15 @@ int RageSound_OSS::GetPosition(const RageSound *snd) const RageSound_OSS::RageSound_OSS() { + /* If /proc/asound exists, then we're running ALSA. If we got here, we + * probably failed to init ALSA. The only case I've seen of this so far + * was not having access to /dev/snd devices. + * + * Don't run OSS under ALSA; we'll get emulation, and ALSA's OSS emulation + * is buggy. */ + if( IsADirectory("/proc/asound") ) + RageException::ThrowNonfatal( "RageSound_OSS: ALSA detected. ALSA OSS emulation is buggy; use ALSA natively."); + shutdown = false; last_cursor_pos = 0;