mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X:
- 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:
parent
fd858a1784
commit
ba8495dc94
|
@ -194,6 +194,8 @@ void V_VolumeSlide::Update()
|
||||||
// Volume slides use the same basic logic as ADSR, but simplified (single-stage
|
// Volume slides use the same basic logic as ADSR, but simplified (single-stage
|
||||||
// instead of multi-stage)
|
// instead of multi-stage)
|
||||||
|
|
||||||
|
if( Increment == 0x7f ) return;
|
||||||
|
|
||||||
if (Mode & VOLFLAG_DECREMENT)
|
if (Mode & VOLFLAG_DECREMENT)
|
||||||
{
|
{
|
||||||
// Decrement
|
// Decrement
|
||||||
|
@ -204,7 +206,7 @@ void V_VolumeSlide::Update()
|
||||||
Value -= PsxRates[(Increment^0x7f)-0x1b+off+32];
|
Value -= PsxRates[(Increment^0x7f)-0x1b+off+32];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Value -= Increment<<8;
|
Value -= PsxRates[(Increment^0x7f)-0xf+32];
|
||||||
|
|
||||||
if (Value < 0)
|
if (Value < 0)
|
||||||
{
|
{
|
||||||
|
@ -221,7 +223,8 @@ void V_VolumeSlide::Update()
|
||||||
if( (Mode & VOLFLAG_EXPONENTIAL) && (Value>=0x60000000))
|
if( (Mode & VOLFLAG_EXPONENTIAL) && (Value>=0x60000000))
|
||||||
Value += PsxRates[(Increment^0x7f)-0x18+32];
|
Value += PsxRates[(Increment^0x7f)-0x18+32];
|
||||||
else
|
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"?
|
if( Value < 0 ) // wrapped around the "top"?
|
||||||
{
|
{
|
||||||
|
|
|
@ -727,7 +727,8 @@ static void __fastcall RegWrite_VoiceParams( u16 value )
|
||||||
if (value & 0x8000) // +Lin/-Lin/+Exp/-Exp
|
if (value & 0x8000) // +Lin/-Lin/+Exp/-Exp
|
||||||
{
|
{
|
||||||
thisvol.Mode = (value & 0xF000)>>12;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -1083,10 +1084,11 @@ static void __fastcall RegWrite_CoreExt( u16 value )
|
||||||
{
|
{
|
||||||
V_VolumeSlide& thisvol = (addr==REG_P_MVOLL) ? thiscore.MasterVol.Left : thiscore.MasterVol.Right;
|
V_VolumeSlide& thisvol = (addr==REG_P_MVOLL) ? thiscore.MasterVol.Left : thiscore.MasterVol.Right;
|
||||||
|
|
||||||
if( value & 0x8000 ) // +Lin/-Lin/+Exp/-Exp
|
if (value & 0x8000) // +Lin/-Lin/+Exp/-Exp
|
||||||
{
|
{
|
||||||
thisvol.Mode = (value & 0xE000) / 0x2000;
|
thisvol.Mode = (value & 0xF000)>>12;
|
||||||
thisvol.Increment = (value & 0x7F); // | ((value & 0x800)/0x10);
|
thisvol.Increment = (value & 0x7F);
|
||||||
|
//printf("slides Mode = %x, Increment = %x\n",thisvol.Mode,thisvol.Increment);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue