From 3127f812ddd41d5e5117e679c623d479366b7d73 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 22 Dec 2006 05:36:50 +0000 Subject: [PATCH] cleanup; handle different numbers of channels --- stepmania/src/RageSoundReader_Chain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/RageSoundReader_Chain.cpp b/stepmania/src/RageSoundReader_Chain.cpp index 1e447cabdc..2aadbba533 100644 --- a/stepmania/src/RageSoundReader_Chain.cpp +++ b/stepmania/src/RageSoundReader_Chain.cpp @@ -351,7 +351,7 @@ int RageSoundReader_Chain::Read( char *pBuffer, int iFrames ) RageSoundMixBuffer mix; /* Read iFrames from each sound. */ int16_t Buffer[2048]; - iFrames = min( iFrames, 1024 ); + iFrames = min( iFrames, (int) (ARRAYLEN(Buffer) / m_iChannels) ); int iMaxFramesRead = 0; for( unsigned i = 0; i < m_apActiveSounds.size(); ) {