From 8c799e09ced20bd99c1dfa36fd3150baa43d22f9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 12 Jan 2004 02:11:28 +0000 Subject: [PATCH] simplify --- stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp b/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp index 60ff34a6da..6866d51374 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_DSound.cpp @@ -144,13 +144,12 @@ bool RageSound_DSound::stream::GetData(bool init) memset( locked_buf, 0, iSilentBytesInThisBuffer ); bytes_read += iSilentBytesInThisBuffer; bytes_left -= iSilentBytesInThisBuffer; - play_pos += iSilentFramesInThisBuffer; if( !iSilentBytesInThisBuffer ) start_time.SetZero(); } - unsigned got = snd->GetPCM( locked_buf+bytes_read, len-bytes_read, play_pos ); + unsigned got = snd->GetPCM( locked_buf+bytes_read, len-bytes_read, play_pos + (bytes_read/samplesize)); bytes_read += got; if( bytes_read < len )