- More fixes to "slides". The few games using them should sound mostly correct now.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2686 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2010-03-09 19:18:48 +00:00
parent fd858a1784
commit ba8495dc94
2 changed files with 11 additions and 6 deletions

View File

@ -194,6 +194,8 @@ void V_VolumeSlide::Update()
// Volume slides use the same basic logic as ADSR, but simplified (single-stage
// instead of multi-stage)
if( Increment == 0x7f ) return;
if (Mode & VOLFLAG_DECREMENT)
{
// Decrement
@ -204,7 +206,7 @@ void V_VolumeSlide::Update()
Value -= PsxRates[(Increment^0x7f)-0x1b+off+32];
}
else
Value -= Increment<<8;
Value -= PsxRates[(Increment^0x7f)-0xf+32];
if (Value < 0)
{
@ -221,7 +223,8 @@ void V_VolumeSlide::Update()
if( (Mode & VOLFLAG_EXPONENTIAL) && (Value>=0x60000000))
Value += PsxRates[(Increment^0x7f)-0x18+32];
else
Value += Increment<<8;
// linear / Pseudo below 75% (they're the same)
Value += PsxRates[(Increment^0x7f)-0x10+32];
if( Value < 0 ) // wrapped around the "top"?
{

View File

@ -727,7 +727,8 @@ static void __fastcall RegWrite_VoiceParams( u16 value )
if (value & 0x8000) // +Lin/-Lin/+Exp/-Exp
{
thisvol.Mode = (value & 0xF000)>>12;
thisvol.Increment = (value & 0x3F);
thisvol.Increment = (value & 0x7F);
//printf("slides Mode = %x, Increment = %x\n",thisvol.Mode,thisvol.Increment);
}
else
{
@ -1085,8 +1086,9 @@ static void __fastcall RegWrite_CoreExt( u16 value )
if (value & 0x8000) // +Lin/-Lin/+Exp/-Exp
{
thisvol.Mode = (value & 0xE000) / 0x2000;
thisvol.Increment = (value & 0x7F); // | ((value & 0x800)/0x10);
thisvol.Mode = (value & 0xF000)>>12;
thisvol.Increment = (value & 0x7F);
//printf("slides Mode = %x, Increment = %x\n",thisvol.Mode,thisvol.Increment);
}
else
{