From 638a5fd89d76dab1575fa76bcb217be3ba082d17 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 1 Nov 2004 07:47:38 +0000 Subject: [PATCH] fix assertion failure --- stepmania/src/RageSoundReader_Chain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stepmania/src/RageSoundReader_Chain.cpp b/stepmania/src/RageSoundReader_Chain.cpp index 75da49f036..2cb6e1e2f3 100644 --- a/stepmania/src/RageSoundReader_Chain.cpp +++ b/stepmania/src/RageSoundReader_Chain.cpp @@ -256,9 +256,9 @@ int RageSoundReader_Chain::ReadBlock( int16_t *pBuffer, int iFrames ) m_apActiveSounds.front().pSound->GetSampleRate() == m_iActualSampleRate ) { /* We have only one source, and it matches our target. Don't mix; read - * directly from the source into the destination. (This is to optimize - * the common case of having one BGM track and no autoplay sounds.) */ - int iBytes = m_apActiveSounds.front().pSound->Read( (char *) pBuffer, iFrames * sizeof(int16_t) * m_iChannels ); + * directly from the source into the destination. This is to optimize + * the common case of having one BGM track and no autoplay sounds. */ + int iBytes = m_apActiveSounds.front().pSound->Read( (char *) pBuffer, iFramesToRead * sizeof(int16_t) * m_iChannels ); if( iBytes == 0 ) ReleaseSound( 0 ); return iBytes / (sizeof(int16_t) * m_iChannels);