From 4466f9446315fd70f68a698532f6467a535e9dec Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 23 May 2004 21:16:22 +0000 Subject: [PATCH] remove old hacks --- stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp | 5 ----- stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp | 5 ----- stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp | 6 +----- .../src/arch/Sound/RageSoundDriver_DSound_Software.cpp | 5 ----- stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp | 5 ----- stepmania/src/arch/Sound/RageSoundDriver_WaveOut.cpp | 4 ---- 6 files changed, 1 insertion(+), 29 deletions(-) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp index 890a357c0d..5bda584d89 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp @@ -25,11 +25,6 @@ int RageSound_ALSA9::MixerThread_start(void *p) void RageSound_ALSA9::MixerThread() { - /* SOUNDMAN will be set once RageSoundManager's ctor returns and - * assigns it; we might get here before that happens, though. */ - while( !SOUNDMAN && !shutdown ) - usleep( 10000 ); - while(!shutdown) { /* Sleep for the size of one chunk. */ diff --git a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp index dbd2c23e3a..90d352086f 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp @@ -35,11 +35,6 @@ int RageSound_ALSA9_Software::MixerThread_start(void *p) void RageSound_ALSA9_Software::MixerThread() { - /* SOUNDMAN will be set once RageSoundManager's ctor returns and - * assigns it; we might get here before that happens, though. */ - while( !SOUNDMAN && !shutdown ) - usleep( 10000 ); - setpriority( PRIO_PROCESS, 0, -15 ); while(!shutdown) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp b/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp index 87f2c6f7a2..35e4670a9c 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp @@ -35,11 +35,7 @@ int RageSound_DSound::MixerThread_start(void *p) void RageSound_DSound::MixerThread() { - /* SOUNDMAN will be set once RageSoundManager's ctor returns and - * assigns it; we might get here before that happens, though. */ - while(!SOUNDMAN && !shutdown) Sleep(10); - - if(!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL)) + if( !SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL) ) LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set sound thread priority")); while( !shutdown ) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_DSound_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_DSound_Software.cpp index dc6a2a5d7a..5a5c8f3901 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_DSound_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_DSound_Software.cpp @@ -21,11 +21,6 @@ static int chunksize() { return max_writeahead / num_chunks; } void RageSound_DSound_Software::MixerThread() { - /* SOUNDMAN will be set once RageSoundManager's ctor returns and - * assigns it; we might get here before that happens, though. */ - while( !SOUNDMAN && !shutdown_mixer_thread ) - usleep( 10000 ); - if( !SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL) ) if( !SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL) ) LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set sound thread priority")); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp index f051e4d8a9..7b5f0a847d 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp @@ -30,11 +30,6 @@ int RageSound_OSS::MixerThread_start(void *p) void RageSound_OSS::MixerThread() { - /* SOUNDMAN will be set once RageSoundManager's ctor returns and - * assigns it; we might get here before that happens, though. */ - while( !SOUNDMAN && !shutdown ) - usleep( 10000 ); - /* We want to set a higher priority, but Unix only lets root renice * < 0, which is silly. Give it a try, anyway. */ nice( -10 ); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_WaveOut.cpp b/stepmania/src/arch/Sound/RageSoundDriver_WaveOut.cpp index 6b1c940cbc..bbac8901a8 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_WaveOut.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_WaveOut.cpp @@ -40,10 +40,6 @@ int RageSound_WaveOut::MixerThread_start(void *p) void RageSound_WaveOut::MixerThread() { - /* SOUNDMAN will be set once RageSoundManager's ctor returns and - * assigns it; we might get here before that happens, though. */ - while(!SOUNDMAN && !shutdown) Sleep(10); - if( !SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL) ) LOG->Warn( werr_ssprintf(GetLastError(), "Failed to set sound thread priority") );