From e6e271f790c95fc9c5ed6092c6a498ac86146635 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 17 Mar 2003 20:02:20 +0000 Subject: [PATCH] hopefully fix some skips in DSound (sleep calculation was giving results higher than I intended) --- stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp b/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp index b5738535f6..c1782098b6 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp @@ -49,7 +49,9 @@ void RageSound_DSound::MixerThread() while(!shutdown) { VDCHECKPOINT; - float sleep_secs = (float(chunksize/2) / samplerate); + /* Sleep for the size of one chunk. */ + const int chunksize_frames = buffersize_frames / num_chunks; + float sleep_secs = (float(chunksize_frames) / samplerate); Sleep(int(1000 * sleep_secs)); VDCHECKPOINT;