SPU2-X: Cixed a tyop-ish error in the code that caused reverb static and crackling.

Fixed savestates so that they don't return an error anymore.
Fixed some bugs in the config box.  Some checkboxes weren't being saved and stuff.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@499 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-02-15 11:03:31 +00:00
parent c7deaad3c6
commit c0407f42d7
7 changed files with 26 additions and 19 deletions

View File

@ -960,8 +960,8 @@ static void __fastcall MixCore(s32& OutL, s32& OutR, s32 ExtL, s32 ExtR)
TDR += SDR & thiscore.SndDryR;
// Mix in the External (nothing/core0) data
OutL = TDL + (ExtL & thiscore.ExtDryL);
OutR = TDR + (ExtR & thiscore.ExtDryR);
TDL += ExtL & thiscore.ExtDryL;
TDR += ExtR & thiscore.ExtDryR;
if( !EffectsDisabled )
{
@ -991,15 +991,22 @@ static void __fastcall MixCore(s32& OutL, s32& OutR, s32 ExtL, s32 ExtR)
TWR = ApplyVolume(RVR,thiscore.FxR);
//Mix Wet,Dry
OutL += TWL;
OutR += TWR;
OutL = TDL + TWL;
OutR = TDR + TWR;
}
else
{
WaveDump::WriteCore( core, CoreSrc_PreReverb, 0, 0 );
WaveDump::WriteCore( core, CoreSrc_PostReverb, 0, 0 );
OutL = TDL;
OutR = TDR;
}
}
else
{
OutL = TDL;
OutR = TDR;
}
// Apply Master Volume. The core will need this when the function returns.

View File

@ -214,7 +214,10 @@ using namespace Savestate;
EXPORT_C_(s32) SPU2freeze(int mode, freezeData *data)
{
jASSUME( mode > 0 && mode < 3 );
if( mode == FREEZE_SIZE )
return SizeIt();
jASSUME( mode == FREEZE_LOAD || mode == FREEZE_SAVE );
jASSUME( data != NULL );
if( data->data == NULL ) return -1;
@ -224,7 +227,6 @@ EXPORT_C_(s32) SPU2freeze(int mode, freezeData *data)
{
case FREEZE_LOAD: return ThawIt( spud );
case FREEZE_SAVE: return FreezeIt( spud );
case FREEZE_SIZE: return SizeIt();
jNO_DEFAULT;
}

View File

@ -179,6 +179,11 @@ BOOL CALLBACK ConfigProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
EnableWindow( GetDlgItem( hWnd, IDC_OPEN_CONFIG_SOUNDTOUCH ), !timeStretchDisabled );
EnableWindow( GetDlgItem( hWnd, IDC_OPEN_CONFIG_DEBUG ), DebugEnabled );
SET_CHECK(IDC_EFFECTS_DISABLE, EffectsDisabled);
SET_CHECK(IDC_TS_DISABLE, timeStretchDisabled);
SET_CHECK(IDC_DEBUG_ENABLE, DebugEnabled);
}
break;
@ -227,13 +232,13 @@ BOOL CALLBACK ConfigProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
SoundtouchCfg::OpenDialog( hWnd );
break;
HANDLE_CHECK(IDC_EFFECTS,EffectsDisabled);
HANDLE_CHECK(IDC_EFFECTS_DISABLE,EffectsDisabled);
HANDLE_CHECK(IDC_DSP_ENABLE,dspPluginEnabled);
HANDLE_CHECKNB(IDC_TS_ENABLE,timeStretchDisabled);
HANDLE_CHECKNB(IDC_TS_DISABLE,timeStretchDisabled);
EnableWindow( GetDlgItem( hWnd, IDC_OPEN_CONFIG_SOUNDTOUCH ), !timeStretchDisabled );
break;
HANDLE_CHECKNB(IDC_DEBUG,DebugEnabled);
HANDLE_CHECKNB(IDC_DEBUG_ENABLE,DebugEnabled);
DebugConfig::EnableControls( hWnd );
EnableWindow( GetDlgItem( hWnd, IDC_OPEN_CONFIG_DEBUG ), DebugEnabled );
break;

View File

@ -88,7 +88,7 @@ void ReadSettings()
void WriteSettings()
{
CfgWriteBool(Section,_T("Global_Debug_Enabled"),DebugEnabled);
CfgWriteBool(Section,_T("Global_Enable"),DebugEnabled);
CfgWriteBool(Section,_T("Show_Messages"), _MsgToConsole);
CfgWriteBool(Section,_T("Show_Messages_Key_On_Off"), _MsgKeyOnOff);

View File

@ -69,7 +69,7 @@ BEGIN
CONTROL 116,IDC_STATIC,"Static",SS_BITMAP,7,196,117,52,WS_EX_CLIENTEDGE
PUSHBUTTON "Advanced...",IDC_OPEN_CONFIG_SOUNDTOUCH,219,130,84,12
PUSHBUTTON "Configure Debug Options...",IDC_OPEN_CONFIG_DEBUG,14,131,108,14
CHECKBOX "Enable Debug Options",IDC_DEBUG,14,117,104,10,NOT WS_TABSTOP
CHECKBOX "Enable Debug Options",IDC_DEBUG_ENABLE,14,117,104,10,NOT WS_TABSTOP
GROUPBOX "",IDC_STATIC,6,107,129,46
CONTROL "Disable Audio Expansion",IDC_EXPANSION_DISABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,152,135,10
LTEXT "Audio expansion detects extended speaker setups like 5.1 and 2.1 audio, and expand the SPU2's stereo stream so that all speakers are used. Disable this if the detection causes problems on your sound system.",IDC_STATIC,162,164,146,44

View File

@ -705,7 +705,6 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
AssemblerOutput="4"
BrowseInformation="1"
CompileAs="0"
/>
@ -771,7 +770,6 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
AssemblerOutput="4"
BrowseInformation="1"
/>
</FileConfiguration>

View File

@ -12,7 +12,6 @@
#define IDB_SPU2X_SMALL 116
#define IDD_CONFIG_SOUNDTOUCH 117
#define IDD_CONFIG_DEBUG 118
#define IDC_EFFECTS 1001
#define IDC_EFFECTS_DISABLE 1001
#define IDC_DUMPREGS 1003
#define IDC_DUMPMEM 1004
@ -21,10 +20,10 @@
#define IDC_LOGDMA 1007
#define IDC_LOGREGS 1008
#define IDC_DEBUG 1010
#define IDC_DEBUG_ENABLE 1010
#define IDC_INTERPOLATE 1011
#define IDC_OUTPUT 1013
#define IDC_BUFFERS_SLIDER 1014
#define IDC_TEXT 1019
#define IDC_MSGKEY 1020
#define IDC_MSGDMA 1021
#define IDC_MSGADMA 1022
@ -32,22 +31,18 @@
#define IDC_MSGSHOW 1024
#define IDC_OUTCONF 1028
#define IDC_DSP_ENABLE 1029
#define IDC_TS_ENABLE 1030
#define IDC_TS_DISABLE 1030
#define IDC_DS_DEVICE 1032
#define IDC_DBG_OVERRUNS 1038
#define IDC_DBG_CACHE 1039
#define IDC_DEBUG_GROUP 1040
#define IDC_LATENCY_SLIDER 1041
#define IDC_LATENCY_LABEL 1042
#define ICD_LR_CENTER_SLIDER 1042
#define IDC_SEQLEN_SLIDER 1043
#define IDC_SEEKWIN_SLIDER 1044
#define IDC_OVERLAP_SLIDER 1045
#define IDC_VOLBOOST 1047
#define IDC_MSG_PUBLIC_BUILD 1048
#define IDC_XA2_TRIBLE_BUFFER 1050
#define IDC_CHECK2 1051
#define IDC_EXPANSION_DISABLE 1051
#define IDC_LABEL_VERSION_INFO 1054
#define IDC_LINK_WEBSITE 1055