From f8c19d688dc038e015f9fa1d726e770cfe9e5f24 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 18 Jan 2007 09:28:05 +0000 Subject: [PATCH] clarify --- .../src/arch/Sound/RageSoundDriver_Generic_Software.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp index 300b4294af..693be53e8f 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp @@ -8,7 +8,6 @@ #include "RageSoundReader.h" static const int channels = 2; -static const int bytes_per_frame = channels*2; /* 16-bit */ static int frames_to_buffer; @@ -162,13 +161,13 @@ RageSoundMixBuffer &RageSoundDriver::MixIntoBuffer( int iFrames, int64_t iFrameN void RageSoundDriver::Mix( int16_t *pBuf, int iFrames, int64_t iFrameNumber, int64_t iCurrentFrame ) { - memset( pBuf, 0, iFrames*bytes_per_frame ); + memset( pBuf, 0, iFrames*channels*sizeof(int16_t) ); MixIntoBuffer( iFrames, iFrameNumber, iCurrentFrame ).read( pBuf ); } void RageSoundDriver::Mix( float *pBuf, int iFrames, int64_t iFrameNumber, int64_t iCurrentFrame ) { - memset( pBuf, 0, iFrames*bytes_per_frame*2 ); + memset( pBuf, 0, iFrames*channels*sizeof(float) ); MixIntoBuffer( iFrames, iFrameNumber, iCurrentFrame ).read( pBuf ); }