From db4aaadd8e444abb0d584c4afd1c095820407a8b Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 30 Mar 2008 20:38:19 +0000 Subject: [PATCH] compare out_sum against getGate()+0.0001f as getGate() might be 0 while out_sum in many cases never will reach 0,0...0 again - fixes high CPU-usage even after stop playing git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@818 0778d3d1-df1d-0410-868b-ea421aaaa00d --- plugins/bass_booster/bass_booster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/bass_booster/bass_booster.cpp b/plugins/bass_booster/bass_booster.cpp index 9617d9511..ba654043f 100644 --- a/plugins/bass_booster/bass_booster.cpp +++ b/plugins/bass_booster/bass_booster.cpp @@ -92,7 +92,7 @@ bool FASTCALL bassBoosterEffect::processAudioBuffer( surroundSampleFrame * _buf, } } - if( out_sum <= getGate() ) + if( out_sum <= getGate()+0.0001f ) { incrementBufferCount(); if( getBufferCount() > getTimeout() ) @@ -105,6 +105,7 @@ bool FASTCALL bassBoosterEffect::processAudioBuffer( surroundSampleFrame * _buf, { resetBufferCount(); } + return( isRunning() ); }