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
This commit is contained in:
ramapcsx2 2008-11-03 18:00:35 +00:00 committed by Gregory Hainaut
parent 5d6c89f1e2
commit 3d4583dcbb
1 changed files with 2 additions and 2 deletions

View File

@ -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++;