From 33d92faeb113ecc225c8ee2a6d335272af34272d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 2 Nov 2004 07:38:24 +0000 Subject: [PATCH] fix reading mono sounds in a stereo chain --- stepmania/src/RageSoundReader_Chain.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/RageSoundReader_Chain.cpp b/stepmania/src/RageSoundReader_Chain.cpp index 2cb6e1e2f3..0038504be7 100644 --- a/stepmania/src/RageSoundReader_Chain.cpp +++ b/stepmania/src/RageSoundReader_Chain.cpp @@ -290,7 +290,10 @@ int RageSoundReader_Chain::ReadBlock( int16_t *pBuffer, int iFrames ) iMaxFramesRead = max( iMaxFramesRead, iFramesRead ); if( m_iChannels == 2 && pSound->GetNumChannels() == 1 ) + { RageSoundUtil::ConvertMonoToStereoInPlace( Buffer, iSamplesRead ); + iSamplesRead *= 2; + } if( fabsf(s.fPan) > 0.0001f ) RageSoundUtil::Pan( Buffer, iFramesRead, s.fPan );