From 1c2fa7eff6808f994a8bc34721381be585e59137 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sun, 10 Dec 2006 13:13:47 +0000 Subject: [PATCH] Ensure that the precondition is satisfied before calling those functions. Perhaps I'll fix the code to handle misaligned addresses at some point. --- stepmania/src/RageSoundMixBuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageSoundMixBuffer.cpp b/stepmania/src/RageSoundMixBuffer.cpp index 2d4e876632..2b05919d5a 100644 --- a/stepmania/src/RageSoundMixBuffer.cpp +++ b/stepmania/src/RageSoundMixBuffer.cpp @@ -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;