diff --git a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp index d03809da83..5e87a0e1b9 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp @@ -27,14 +27,15 @@ 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) SDL_Delay(10); + while( !SOUNDMAN && !shutdown ) + usleep( 10000 ); while(!shutdown) { /* Sleep for the size of one chunk. */ const int chunksize_frames = max_writeahead / num_chunks; float sleep_secs = (float(chunksize_frames) / samplerate); - SDL_Delay( 20 ); // int(1000 * sleep_secs)); + usleep( 20000 ); // int(1000 * sleep_secs)); LockMut( m_Mutex ); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp index 959d04d74d..a39c5eb52b 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp @@ -37,7 +37,8 @@ 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) SDL_Delay(10); + while( !SOUNDMAN && !shutdown ) + usleep( 10000 ); setpriority( PRIO_PROCESS, 0, -15 ); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp index 1614a625f3..fe87e6fd67 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp @@ -142,14 +142,14 @@ void RageSound_Generic_Software::DecodeThread() /* SOUNDMAN will be set once RageSoundManager's ctor returns and * assigns it; we might get here before that happens, though. */ while( !SOUNDMAN && !shutdown_decode_thread ) - SDL_Delay( 10 ); + usleep( 10000 ); SetupDecodingThread(); while( !shutdown_decode_thread ) { /* Fill each playing sound, round-robin. */ - SDL_Delay( 1000*chunksize() / GetSampleRate(0) ); + usleep( 1000000*chunksize() / GetSampleRate(0) ); LockMut( m_Mutex ); // LOG->Trace("begin mix");