fix buffer alignment; caused static in mono sounds

This commit is contained in:
Glenn Maynard
2007-01-26 09:28:00 +00:00
parent abe62b0920
commit bf40f3aa98
+1 -3
View File
@@ -37,8 +37,6 @@
#include "RageSoundReader_FileReader.h"
#include "RageSoundReader_ThreadedBuffer.h"
static const int channels = 2;
static const int framesize = 2 * channels; /* 16-bit */
#define samplerate() m_pSource->GetSampleRate()
RageSoundParams::RageSoundParams():
@@ -289,7 +287,7 @@ int RageSound::GetDataToPlay( int16_t *pBuffer, int iFrames, int64_t &iStreamFra
int iSourceFrame;
/* Read data from our source. */
int iGotFrames = m_pSource->RetriedRead( pBuffer + (iFramesStored * channels), iFrames, &iSourceFrame, &fRate );
int iGotFrames = m_pSource->RetriedRead( pBuffer + (iFramesStored * m_pSource->GetNumChannels()), iFrames, &iSourceFrame, &fRate );
if( iGotFrames == RageSoundReader::ERROR )
{