From 3d4583dcbb361d161e4f9aa1d513ea15846f73e5 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Mon, 3 Nov 2008 18:00:35 +0000 Subject: [PATCH] SPU2Ghz: Fixed a problem in ADSR handling as suggested by gigaherz. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@284 a6443dda-0b58-4228-96e9-037be469359c --- plugins/spu2ghz/mixer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/spu2ghz/mixer.cpp b/plugins/spu2ghz/mixer.cpp index 9623a3cb99..7f69fe0c83 100644 --- a/plugins/spu2ghz/mixer.cpp +++ b/plugins/spu2ghz/mixer.cpp @@ -394,7 +394,7 @@ static void __forceinline CalculateADSR( V_Voice& vc ) { env.Value -= PsxRates[(env.Sr^0x7f)-0xf+32]; } - if( env.Value < 0 ) + if( env.Value <= 0 ) { env.Value = 0; env.Phase++; @@ -447,7 +447,7 @@ static void __forceinline CalculateADSR( V_Voice& vc ) env.Value-=PsxRates[((env.Rr^0x1f)<<2)-0xc+32]; } - if( env.Value < 0 ) + if( env.Value <= 0 ) { env.Value=0; env.Phase++;