Ensure that the precondition is satisfied before calling those functions. Perhaps I'll fix the code to handle misaligned addresses at some point.

This commit is contained in:
Steve Checkoway
2006-12-10 13:13:47 +00:00
parent afa3284614
commit 1c2fa7eff6
+2 -2
View File
@@ -83,7 +83,7 @@ void RageSoundMixBuffer::write( const int16_t *pBuf, unsigned iSize, int iSource
void RageSoundMixBuffer::read( int16_t *pBuf )
{
#ifdef USE_VEC
if( g_bVector )
if( g_bVector && (intptr_t(pBuf) & 0xF) == 0 )
{
Vector::FastSoundRead( pBuf, m_pMixbuf, m_iBufUsed );
m_iBufUsed = 0;
@@ -101,7 +101,7 @@ void RageSoundMixBuffer::read( int16_t *pBuf )
void RageSoundMixBuffer::read( float *pBuf )
{
#ifdef USE_VEC
if( g_bVector )
if( g_bVector && (intptr_t(pBuf) & 0xF) == 0 )
{
Vector::FastSoundRead( pBuf, m_pMixbuf, m_iBufUsed );
m_iBufUsed = 0;