mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X: Configuration for the output volume in the settings dialog. And it works, too! :P
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4661 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
633a31ccbc
commit
149fcf9662
|
@ -110,7 +110,7 @@ void WriteSettings()
|
|||
|
||||
CfgWriteInt(L"MIXING",L"Interpolation",Interpolation);
|
||||
CfgWriteBool(L"MIXING",L"Disable_Effects",EffectsDisabled);
|
||||
CfgWriteInt(L"MIXING",L"FinalVolume",(int)(FinalVolume*100));
|
||||
CfgWriteInt(L"MIXING",L"FinalVolume",(int)(FinalVolume * 100 +0.5f));
|
||||
CfgWriteInt(L"MIXING",L"Reverb_Boost",ReverbBoost);
|
||||
|
||||
CfgWriteStr(L"OUTPUT",L"Output_Module", mods[OutputModule]->GetIdent() );
|
||||
|
|
|
@ -111,7 +111,7 @@ void WriteSettings()
|
|||
CfgWriteInt(L"MIXING",L"Reverb_Boost",ReverbBoost);
|
||||
|
||||
CfgWriteBool(L"MIXING",L"Disable_Effects",EffectsDisabled);
|
||||
CfgWriteInt(L"MIXING",L"FinalVolume",(int)(FinalVolume*100));
|
||||
CfgWriteInt(L"MIXING",L"FinalVolume",(int)(FinalVolume * 100 + 0.5f));
|
||||
|
||||
CfgWriteStr(L"OUTPUT",L"Output_Module", mods[OutputModule]->GetIdent() );
|
||||
CfgWriteInt(L"OUTPUT",L"Latency", SndOutLatencyMS);
|
||||
|
@ -191,11 +191,17 @@ BOOL CALLBACK ConfigProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
|
|||
swprintf_s(temp,L"%d ms (avg)",SndOutLatencyMS);
|
||||
SetWindowText(GetDlgItem(hWnd,IDC_LATENCY_LABEL),temp);
|
||||
|
||||
int configvol = (int)(FinalVolume * 100 + 0.5f);
|
||||
INIT_SLIDER( IDC_VOLUME_SLIDER, 0, 100, 10, 42, 1 );
|
||||
|
||||
SendDialogMsg( hWnd, IDC_VOLUME_SLIDER, TBM_SETPOS, TRUE, configvol );
|
||||
swprintf_s(temp,L"%d%%",configvol);
|
||||
SetWindowText(GetDlgItem(hWnd,IDC_VOLUME_LABEL),temp);
|
||||
|
||||
EnableWindow( GetDlgItem( hWnd, IDC_OPEN_CONFIG_SOUNDTOUCH ), (SynchMode == 0) );
|
||||
EnableWindow( GetDlgItem( hWnd, IDC_OPEN_CONFIG_DEBUG ), DebugEnabled );
|
||||
|
||||
SET_CHECK(IDC_EFFECTS_DISABLE, EffectsDisabled);
|
||||
//FinalVolume;
|
||||
SET_CHECK(IDC_DEBUG_ENABLE, DebugEnabled);
|
||||
SET_CHECK(IDC_DSP_ENABLE, dspPluginEnabled);
|
||||
}
|
||||
|
@ -212,7 +218,7 @@ BOOL CALLBACK ConfigProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
|
|||
double res = ((int)SendDialogMsg( hWnd, IDC_LATENCY_SLIDER, TBM_GETPOS, 0, 0 )) / 128.0;
|
||||
SndOutLatencyMS = (int)pow( res, 3.0 );
|
||||
Clampify( SndOutLatencyMS, LATENCY_MIN, LATENCY_MAX );
|
||||
|
||||
FinalVolume = (float)(SendDialogMsg( hWnd, IDC_VOLUME_SLIDER, TBM_GETPOS, 0, 0 )) / 100;
|
||||
Interpolation = (int)SendDialogMsg( hWnd, IDC_INTERPOLATE, CB_GETCURSEL,0,0 );
|
||||
ReverbBoost = (int)SendDialogMsg( hWnd, IDC_REVERB_BOOST, CB_GETCURSEL,0,0 );
|
||||
OutputModule = (int)SendDialogMsg( hWnd, IDC_OUTPUT, CB_GETCURSEL,0,0 );
|
||||
|
@ -252,7 +258,6 @@ BOOL CALLBACK ConfigProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
|
|||
break;
|
||||
|
||||
HANDLE_CHECK(IDC_EFFECTS_DISABLE,EffectsDisabled);
|
||||
//FinalVolume;
|
||||
HANDLE_CHECK(IDC_DSP_ENABLE,dspPluginEnabled);
|
||||
|
||||
// Fixme : Eh, how to update this based on drop list selections? :p
|
||||
|
@ -307,6 +312,12 @@ BOOL CALLBACK ConfigProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
|
|||
swprintf_s(temp,L"%d ms (avg)",curpos);
|
||||
SetDlgItemText(hWnd,IDC_LATENCY_LABEL,temp);
|
||||
}
|
||||
|
||||
if( hwndDlg == GetDlgItem( hWnd, IDC_VOLUME_SLIDER ) )
|
||||
{
|
||||
swprintf_s(temp,L"%d%%",curpos);
|
||||
SetDlgItemText(hWnd,IDC_VOLUME_LABEL,temp);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -44,39 +44,42 @@ BEGIN
|
|||
CTEXT "Brought to you by the collaborative efforts of the Pcsx2 Development Team.",IDC_STATIC,9,141,273,10
|
||||
END
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, 319, 290
|
||||
IDD_CONFIG DIALOGEX 0, 0, 319, 302
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "SPU2-X Settings"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x0
|
||||
BEGIN
|
||||
PUSHBUTTON "OK",IDOK,200,264,54,15,NOT WS_TABSTOP
|
||||
PUSHBUTTON "Cancel",IDCANCEL,259,264,54,15,NOT WS_TABSTOP
|
||||
PUSHBUTTON "OK",IDOK,200,276,54,15,NOT WS_TABSTOP
|
||||
PUSHBUTTON "Cancel",IDCANCEL,259,276,54,15,NOT WS_TABSTOP
|
||||
GROUPBOX "Mixing Settings",IDC_STATIC,6,5,130,115
|
||||
GROUPBOX "Output Settings",IDC_STATIC,142,0,172,256
|
||||
GROUPBOX "Output Settings",IDC_STATIC,142,0,172,268
|
||||
COMBOBOX IDC_OUTPUT,154,26,126,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure...",IDC_OUTCONF,236,40,54,12
|
||||
COMBOBOX IDC_INTERPOLATE,14,26,114,84,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Slider2",IDC_LATENCY_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,167,73,116,10
|
||||
CONTROL "Use a Winamp DSP plugin",IDC_DSP_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,201,126,11
|
||||
CONTROL "Slider2",IDC_LATENCY_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,166,94,116,10
|
||||
CONTROL "Use a Winamp DSP plugin",IDC_DSP_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,223,126,11
|
||||
CHECKBOX "Disable Effects Processing",IDC_EFFECTS_DISABLE,14,47,112,10,NOT WS_TABSTOP
|
||||
LTEXT "Latency:",IDC_STATIC,181,62,33,9,NOT WS_GROUP
|
||||
LTEXT "Latency:",IDC_STATIC,189,84,29,8,NOT WS_GROUP
|
||||
LTEXT "Interpolation:",IDC_STATIC,12,16,55,10,NOT WS_GROUP
|
||||
LTEXT "Module:",IDC_STATIC,161,16,50,9,NOT WS_GROUP
|
||||
LTEXT "(speedup!) Skips reverb effects processing, but won't sound as good in most games.",IDC_STATIC,26,60,104,36
|
||||
LTEXT "(currently requires manual configuration via the ini file)",IDC_STATIC,162,214,146,20
|
||||
CTEXT "100 ms (avg)",IDC_LATENCY_LABEL,215,62,58,9
|
||||
CONTROL 116,IDC_STATIC,"Static",SS_BITMAP,6,202,119,55,WS_EX_CLIENTEDGE
|
||||
PUSHBUTTON "Advanced...",IDC_OPEN_CONFIG_SOUNDTOUCH,219,127,84,12
|
||||
LTEXT "(currently requires manual configuration via the ini file)",IDC_STATIC,162,236,146,20
|
||||
CTEXT "100 ms (avg)",IDC_LATENCY_LABEL,224,86,58,9
|
||||
CONTROL 116,IDC_STATIC,"Static",SS_BITMAP,6,213,119,55,WS_EX_CLIENTEDGE
|
||||
PUSHBUTTON "Advanced...",IDC_OPEN_CONFIG_SOUNDTOUCH,219,149,84,12
|
||||
PUSHBUTTON "Configure Debug Options...",IDC_OPEN_CONFIG_DEBUG,14,167,108,14
|
||||
CHECKBOX "Enable Debug Options",IDC_DEBUG_ENABLE,14,153,104,10,NOT WS_TABSTOP
|
||||
GROUPBOX "",IDC_STATIC,6,143,129,46
|
||||
LTEXT "Audio Expansion Mode:",IDC_STATIC,161,154,135,9,NOT WS_GROUP
|
||||
COMBOBOX IDC_SPEAKERS,163,163,135,84,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "WIP - XAudio2 Only",IDC_STATIC,161,182,135,9,NOT WS_GROUP
|
||||
LTEXT "Audio Expansion Mode:",IDC_STATIC,161,176,135,9,NOT WS_GROUP
|
||||
COMBOBOX IDC_SPEAKERS,163,185,135,84,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "WIP - XAudio2 Only",IDC_STATIC,161,204,135,9,NOT WS_GROUP
|
||||
COMBOBOX IDC_REVERB_BOOST,14,99,114,84,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Reverb Boost Factor",IDC_STATIC,12,88,75,10,NOT WS_GROUP
|
||||
CONTROL "Synchronizing Mode:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,161,94,131,8
|
||||
COMBOBOX IDC_SYNCHMODE,163,103,134,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Synchronizing Mode:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,161,116,131,8
|
||||
COMBOBOX IDC_SYNCHMODE,163,125,134,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Volume:",IDC_STATIC,192,59,26,8,NOT WS_GROUP
|
||||
CTEXT "100%",IDC_VOLUME_LABEL,224,59,58,9
|
||||
CONTROL "",IDC_VOLUME_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,166,69,116,10
|
||||
END
|
||||
|
||||
IDD_DEBUG DIALOGEX 0, 0, 303, 473
|
||||
|
@ -206,6 +209,10 @@ BEGIN
|
|||
BEGIN
|
||||
LEFTMARGIN, 6
|
||||
RIGHTMARGIN, 314
|
||||
VERTGUIDE, 218
|
||||
VERTGUIDE, 282
|
||||
BOTTOMMARGIN, 292
|
||||
HORZGUIDE, 268
|
||||
END
|
||||
|
||||
IDD_DEBUG, DIALOG
|
||||
|
|
|
@ -57,6 +57,8 @@
|
|||
#define IDC_SYNCHMODE 1064
|
||||
#define IDC_DEBUG_OTHERS 1065
|
||||
#define IDC_DEBUG_VISUAL 1066
|
||||
#define IDC_VOLUME_LABEL 1067
|
||||
#define IDC_VOLUME_SLIDER 1068
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue