mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X:
Configurable output volume, ini only for now. Can be set with "FinalVolume", from 0 to 100. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4619 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6ee229b141
commit
88cf49c2b6
|
@ -65,6 +65,7 @@ extern int Interpolation;
|
|||
extern int ReverbBoost;
|
||||
extern int numSpeakers;
|
||||
extern bool EffectsDisabled;
|
||||
extern float FinalVolume;
|
||||
extern bool postprocess_filter_enabled;
|
||||
|
||||
extern u32 OutputModule;
|
||||
|
|
|
@ -42,6 +42,7 @@ int Interpolation = 4;
|
|||
*/
|
||||
|
||||
bool EffectsDisabled = false;
|
||||
float FinalVolume;
|
||||
int ReverbBoost = 0;
|
||||
bool postprocess_filter_enabled = 1;
|
||||
bool _visual_debug_enabled = false; // windows only feature
|
||||
|
@ -66,6 +67,8 @@ void ReadSettings()
|
|||
|
||||
Interpolation = CfgReadInt( L"MIXING",L"Interpolation", 4 );
|
||||
EffectsDisabled = CfgReadBool( L"MIXING", L"Disable_Effects", false );
|
||||
FinalVolume = ((float)CfgReadInt( L"MIXING", L"FinalVolume", 100 )) / 100;
|
||||
if ( FinalVolume > 1.0f) FinalVolume = 1.0f;
|
||||
ReverbBoost = CfgReadInt( L"MIXING",L"Reverb_Boost", 0 );
|
||||
|
||||
wxString temp;
|
||||
|
@ -107,6 +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"Reverb_Boost",ReverbBoost);
|
||||
|
||||
CfgWriteStr(L"OUTPUT",L"Output_Module", mods[OutputModule]->GetIdent() );
|
||||
|
@ -244,6 +248,7 @@ void DisplayDialog()
|
|||
gtk_container_add(GTK_CONTAINER(main_box), output_frame);
|
||||
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(effects_check), EffectsDisabled);
|
||||
//FinalVolume;
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(debug_check), DebugEnabled);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), main_frame);
|
||||
|
@ -261,6 +266,7 @@ void DisplayDialog()
|
|||
Interpolation = gtk_combo_box_get_active(GTK_COMBO_BOX(int_box));
|
||||
|
||||
EffectsDisabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(effects_check));
|
||||
//FinalVolume;
|
||||
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(reverb_box)) != -1)
|
||||
ReverbBoost = gtk_combo_box_get_active(GTK_COMBO_BOX(reverb_box));
|
||||
|
|
|
@ -70,6 +70,7 @@ static __forceinline bool RegDump() { return _RegDump & DebugEnabled; }*/
|
|||
extern int Interpolation;
|
||||
extern int ReverbBoost;
|
||||
extern bool EffectsDisabled;
|
||||
extern float FinalVolume;
|
||||
extern bool postprocess_filter_enabled;
|
||||
|
||||
extern int AutoDMAPlayRate[2];
|
||||
|
|
|
@ -871,9 +871,17 @@ void Mix()
|
|||
// Like any good audio system, the PS2 pumps the volume and incurs some distortion in its
|
||||
// output, giving us a nice thumpy sound at times. So we add 1 above (2x volume pump) and
|
||||
// then clamp it all here.
|
||||
|
||||
// Edit: I'm sorry Jake, but I know of no good audio system that arbitrary distorts and clips
|
||||
// output by design.
|
||||
// Good thing though that this code gets the volume exactly right, as per tests :)
|
||||
Out = clamp_mix( Out, SndOutVolumeShift );
|
||||
}
|
||||
|
||||
// Configurable output volume
|
||||
Out.Left *= FinalVolume;
|
||||
Out.Right *= FinalVolume;
|
||||
|
||||
SndBuffer::Write( Out );
|
||||
|
||||
// Update AutoDMA output positioning
|
||||
|
|
|
@ -37,6 +37,7 @@ int Interpolation = 4;
|
|||
*/
|
||||
int ReverbBoost = 0;
|
||||
bool EffectsDisabled = false;
|
||||
float FinalVolume;
|
||||
bool postprocess_filter_enabled = 1;
|
||||
|
||||
// OUTPUT
|
||||
|
@ -64,7 +65,8 @@ void ReadSettings()
|
|||
|
||||
SynchMode = CfgReadInt( L"OUTPUT", L"Synch_Mode", 0);
|
||||
EffectsDisabled = CfgReadBool( L"MIXING", L"Disable_Effects", false );
|
||||
|
||||
FinalVolume = ((float)CfgReadInt( L"MIXING", L"FinalVolume", 100 )) / 100;
|
||||
if ( FinalVolume > 1.0f) FinalVolume = 1.0f;
|
||||
numSpeakers = CfgReadInt( L"OUTPUT", L"XAudio2_SpeakerConfiguration", 0);
|
||||
SndOutLatencyMS = CfgReadInt(L"OUTPUT",L"Latency", 150);
|
||||
|
||||
|
@ -109,6 +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));
|
||||
|
||||
CfgWriteStr(L"OUTPUT",L"Output_Module", mods[OutputModule]->GetIdent() );
|
||||
CfgWriteInt(L"OUTPUT",L"Latency", SndOutLatencyMS);
|
||||
|
@ -192,6 +195,7 @@ BOOL CALLBACK ConfigProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
|
|||
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);
|
||||
}
|
||||
|
@ -248,6 +252,7 @@ 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
|
||||
|
|
Loading…
Reference in New Issue