From 032c1269bc9cc4f3749d485120886c16b77f149b Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 17 May 2006 09:13:08 +0000 Subject: [PATCH] Pull size check out of the function. Profiling showed that a large number of samples (as in profiling samples, not sound samples) of Vector::FastSoundWrite() where in its prologue which was attributed to the early exit condition (basically just shuts the profiler up). --- stepmania/src/RageSoundMixBuffer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RageSoundMixBuffer.cpp b/stepmania/src/RageSoundMixBuffer.cpp index d265862321..3d742269e0 100644 --- a/stepmania/src/RageSoundMixBuffer.cpp +++ b/stepmania/src/RageSoundMixBuffer.cpp @@ -62,7 +62,8 @@ void RageSoundMixBuffer::write( const int16_t *buf, unsigned size ) #ifdef USE_VEC if( g_bVector ) { - Vector::FastSoundWrite( pBuf, buf, size, m_iVolumeFactor ); + if( size ) + Vector::FastSoundWrite( pBuf, buf, size, m_iVolumeFactor ); return; } #endif