mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X Reverb: make the filter actually look the way a FIR filter is supposed to look.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4687 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
881982229c
commit
ea367e8326
|
@ -180,7 +180,7 @@ StereoOut32 V_Core::DoReverb( const StereoOut32& Input )
|
|||
// http://cnx.org/content/m15491/latest/
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Part 1: Input filter block
|
||||
// Part 1: Input filter block (FIR filter)
|
||||
// Purpose: Filter and write data to the sample queues for the echos below
|
||||
|
||||
INPUT_SAMPLE.Left >>= 16;
|
||||
|
@ -189,20 +189,20 @@ StereoOut32 V_Core::DoReverb( const StereoOut32& Input )
|
|||
s32 input_L = (INPUT_SAMPLE.Left * Revb.IN_COEF_L);
|
||||
s32 input_R = (INPUT_SAMPLE.Right * Revb.IN_COEF_R);
|
||||
|
||||
const s32 IIR_INPUT_A0 = ((_spu2mem[src_a0] * Revb.IIR_COEF) + input_L)>>16;
|
||||
const s32 IIR_INPUT_A1 = ((_spu2mem[src_a1] * Revb.IIR_COEF) + input_L)>>16;
|
||||
const s32 IIR_INPUT_B0 = ((_spu2mem[src_b0] * Revb.IIR_COEF) + input_R)>>16;
|
||||
const s32 IIR_INPUT_B1 = ((_spu2mem[src_b1] * Revb.IIR_COEF) + input_R)>>16;
|
||||
const s32 IIR_A0 = (_spu2mem[src_a0] * Revb.IIR_COEF) + input_L;
|
||||
const s32 IIR_A1 = (_spu2mem[src_a1] * Revb.IIR_COEF) + input_R;
|
||||
const s32 IIR_B0 = (_spu2mem[src_b0] * Revb.IIR_COEF) + input_L;
|
||||
const s32 IIR_B1 = (_spu2mem[src_b1] * Revb.IIR_COEF) + input_R;
|
||||
|
||||
const s32 IIR_A0 = _spu2mem[dest_a0];
|
||||
const s32 IIR_A1 = _spu2mem[dest_a1];
|
||||
const s32 IIR_B0 = _spu2mem[dest_b0];
|
||||
const s32 IIR_B1 = _spu2mem[dest_b1];
|
||||
const s32 IIR_C0 = _spu2mem[dest_a0]* Revb.IIR_ALPHA;
|
||||
const s32 IIR_C1 = _spu2mem[dest_a1]* Revb.IIR_ALPHA;
|
||||
const s32 IIR_D0 = _spu2mem[dest_b0]* Revb.IIR_ALPHA;
|
||||
const s32 IIR_D1 = _spu2mem[dest_b1]* Revb.IIR_ALPHA;
|
||||
|
||||
_spu2mem[dest2_a0] = clamp_mix( IIR_A0 + (((IIR_INPUT_A0-IIR_A0) * Revb.IIR_ALPHA) >> 16) );
|
||||
_spu2mem[dest2_a1] = clamp_mix( IIR_A1 + (((IIR_INPUT_A1-IIR_A1) * Revb.IIR_ALPHA) >> 16) );
|
||||
_spu2mem[dest2_b0] = clamp_mix( IIR_B0 + (((IIR_INPUT_B0-IIR_B0) * Revb.IIR_ALPHA) >> 16) );
|
||||
_spu2mem[dest2_b1] = clamp_mix( IIR_B1 + (((IIR_INPUT_B1-IIR_B1) * Revb.IIR_ALPHA) >> 16) );
|
||||
_spu2mem[dest2_a0] = clamp_mix( (IIR_A0-IIR_C0) >> 16 );
|
||||
_spu2mem[dest2_a1] = clamp_mix( (IIR_A1-IIR_C1) >> 16 );
|
||||
_spu2mem[dest2_b0] = clamp_mix( (IIR_B0-IIR_D0) >> 16 );
|
||||
_spu2mem[dest2_b1] = clamp_mix( (IIR_B1-IIR_D1) >> 16 );
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue