mirror of https://github.com/PCSX2/pcsx2.git
SPU2: Clean up + add Gaussian value in comment
This commit is contained in:
parent
be2bf9faca
commit
2195ac9051
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
@ -31,17 +31,18 @@ int AutoDMAPlayRate[2] = {0, 0};
|
|||
// MIXING
|
||||
int Interpolation = 5;
|
||||
/* values:
|
||||
0: no interpolation (use nearest)
|
||||
1. linear interpolation
|
||||
2. cubic interpolation
|
||||
3. hermite interpolation
|
||||
4. catmull-rom interpolation
|
||||
0: No interpolation (uses nearest)
|
||||
1. Linear interpolation
|
||||
2. Cubic interpolation
|
||||
3. Hermite interpolation
|
||||
4. Catmull-Rom interpolation
|
||||
5. Gaussian interpolation
|
||||
*/
|
||||
|
||||
bool EffectsDisabled = false;
|
||||
float FinalVolume; // global
|
||||
bool AdvancedVolumeControl;
|
||||
float VolumeAdjustFLdb; // decibels settings, cos audiophiles love that
|
||||
float VolumeAdjustFLdb; // Decibels settings, because audiophiles love that.
|
||||
float VolumeAdjustCdb;
|
||||
float VolumeAdjustFRdb;
|
||||
float VolumeAdjustBLdb;
|
||||
|
@ -49,7 +50,7 @@ float VolumeAdjustBRdb;
|
|||
float VolumeAdjustSLdb;
|
||||
float VolumeAdjustSRdb;
|
||||
float VolumeAdjustLFEdb;
|
||||
float VolumeAdjustFL; // linear coefs calculated from decibels,
|
||||
float VolumeAdjustFL; // Linear coefficients calculated from decibels,
|
||||
float VolumeAdjustC;
|
||||
float VolumeAdjustFR;
|
||||
float VolumeAdjustBL;
|
||||
|
@ -60,12 +61,12 @@ float VolumeAdjustLFE;
|
|||
|
||||
bool postprocess_filter_enabled = true;
|
||||
bool postprocess_filter_dealias = false;
|
||||
bool _visual_debug_enabled = false; // windows only feature
|
||||
bool _visual_debug_enabled = false; // Windows-only feature
|
||||
|
||||
// OUTPUT
|
||||
u32 OutputModule = 0;
|
||||
int SndOutLatencyMS = 100;
|
||||
int SynchMode = 0; // Time Stretch, Async or Disabled
|
||||
int SynchMode = 0; // Time Stretch, Async or Disabled.
|
||||
#ifdef SPU2X_PORTAUDIO
|
||||
u32 OutputAPI = 0;
|
||||
#endif
|
||||
|
@ -80,7 +81,7 @@ bool temp_debug_state;
|
|||
void ReadSettings()
|
||||
{
|
||||
// For some reason this can be called before we know what ini file we're writing to.
|
||||
// Lets not try to read it if that happens.
|
||||
// Let's not try to read it if that happens.
|
||||
if (!pathSet)
|
||||
initIni();
|
||||
|
||||
|
@ -116,9 +117,9 @@ void ReadSettings()
|
|||
#else
|
||||
CfgReadStr(L"OUTPUT", L"Output_Module", temp, PortaudioOut->GetIdent());
|
||||
#endif
|
||||
OutputModule = FindOutputModuleById(temp.c_str()); // find the driver index of this module
|
||||
OutputModule = FindOutputModuleById(temp.c_str()); // Find the driver index of this module...
|
||||
|
||||
// find current API
|
||||
// Find current API.
|
||||
#ifdef SPU2X_PORTAUDIO
|
||||
#ifdef __linux__
|
||||
CfgReadStr(L"PORTAUDIO", L"HostApi", temp, L"ALSA");
|
||||
|
@ -138,7 +139,7 @@ void ReadSettings()
|
|||
CfgReadStr(L"SDL", L"HostApi", temp, L"pulseaudio");
|
||||
SdlOutputAPI = 0;
|
||||
#if SDL_MAJOR_VERSION >= 2
|
||||
// YES It sucks ...
|
||||
// Yes, it sucks ...
|
||||
for (int i = 0; i < SDL_GetNumAudioDrivers(); ++i)
|
||||
{
|
||||
if (!temp.Cmp(wxString(SDL_GetAudioDriver(i), wxConvUTF8)))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
@ -31,18 +31,19 @@ static const int LATENCY_MIN_TS = 15;
|
|||
// MIXING
|
||||
int Interpolation = 5;
|
||||
/* values:
|
||||
0: no interpolation (use nearest)
|
||||
1. linear interpolation
|
||||
2. cubic interpolation
|
||||
3. hermite interpolation
|
||||
4. catmull-rom interpolation
|
||||
0: No interpolation (uses nearest)
|
||||
1. Linear interpolation
|
||||
2. Cubic interpolation
|
||||
3. Hermite interpolation
|
||||
4. Catmull-Rom interpolation
|
||||
5. Gaussian interpolation
|
||||
*/
|
||||
|
||||
bool EffectsDisabled = false;
|
||||
|
||||
float FinalVolume; // Global
|
||||
bool AdvancedVolumeControl;
|
||||
float VolumeAdjustFLdb; // decibels settings, cos audiophiles love that
|
||||
float VolumeAdjustFLdb; // Decibels settings, because audiophiles love that.
|
||||
float VolumeAdjustCdb;
|
||||
float VolumeAdjustFRdb;
|
||||
float VolumeAdjustBLdb;
|
||||
|
@ -50,7 +51,7 @@ float VolumeAdjustBRdb;
|
|||
float VolumeAdjustSLdb;
|
||||
float VolumeAdjustSRdb;
|
||||
float VolumeAdjustLFEdb;
|
||||
float VolumeAdjustFL; // linear coefs calcualted from decibels,
|
||||
float VolumeAdjustFL; // Linear coefficients calculated from decibels,
|
||||
float VolumeAdjustC;
|
||||
float VolumeAdjustFR;
|
||||
float VolumeAdjustBL;
|
||||
|
@ -64,7 +65,7 @@ bool postprocess_filter_dealias = false;
|
|||
|
||||
// OUTPUT
|
||||
int SndOutLatencyMS = 100;
|
||||
int SynchMode = 0; // Time Stretch, Async or Disabled
|
||||
int SynchMode = 0; // Time Stretch, Async or Disabled.
|
||||
|
||||
u32 OutputModule = 0;
|
||||
|
||||
|
@ -115,20 +116,20 @@ void ReadSettings()
|
|||
dplLevel = CfgReadInt(L"OUTPUT", L"DplDecodingLevel", 0);
|
||||
SndOutLatencyMS = CfgReadInt(L"OUTPUT", L"Latency", 100);
|
||||
|
||||
if ((SynchMode == 0) && (SndOutLatencyMS < LATENCY_MIN_TS)) // can't use low-latency with timestretcher atm
|
||||
if ((SynchMode == 0) && (SndOutLatencyMS < LATENCY_MIN_TS)) // Can't use low-latency with timestretcher at the moment.
|
||||
SndOutLatencyMS = LATENCY_MIN_TS;
|
||||
else if (SndOutLatencyMS < LATENCY_MIN)
|
||||
SndOutLatencyMS = LATENCY_MIN;
|
||||
|
||||
wchar_t omodid[128];
|
||||
|
||||
// portaudio occasionally has issues selecting the proper default audio device.
|
||||
// let's use xaudio2 until this is sorted (rama)
|
||||
// Portaudio occasionally has issues selecting the proper default audio device.
|
||||
// Let's use xaudio2 until this is sorted (rama).
|
||||
|
||||
// CfgReadStr(L"OUTPUT", L"Output_Module", omodid, 127, PortaudioOut->GetIdent());
|
||||
CfgReadStr(L"OUTPUT", L"Output_Module", omodid, 127, XAudio2Out->GetIdent());
|
||||
|
||||
// find the driver index of this module:
|
||||
// Find the driver index of this module:
|
||||
OutputModule = FindOutputModuleById(omodid);
|
||||
|
||||
CfgReadStr(L"DSP PLUGIN", L"Filename", dspPlugin, 255, L"");
|
||||
|
@ -227,12 +228,12 @@ BOOL CALLBACK ConfigProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case WM_INITDIALOG:
|
||||
{
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_RESETCONTENT, 0, 0);
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"0 - Nearest (Fastest/bad quality)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"0 - Nearest (Fastest / worst quality)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"1 - Linear (Simple / okay sound)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"2 - Cubic (Artificial highs)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"3 - Hermite (Better highs)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"4 - Catmull-Rom (PS2-like/slow)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"5 - Gaussian (SPU native)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"2 - Cubic (Fake highs / okay sound)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"3 - Hermite (Better highs / okay sound)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"4 - Catmull-Rom (PS2-like / good sound)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_ADDSTRING, 0, (LPARAM)L"5 - Gaussian (PS2-like / great sound)");
|
||||
SendDialogMsg(hWnd, IDC_INTERPOLATE, CB_SETCURSEL, Interpolation, 0);
|
||||
|
||||
SendDialogMsg(hWnd, IDC_SYNCHMODE, CB_RESETCONTENT, 0, 0);
|
||||
|
|
|
@ -30,33 +30,33 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x0
|
|||
BEGIN
|
||||
PUSHBUTTON "OK",IDOK,101,238,50,14,NOT WS_TABSTOP
|
||||
PUSHBUTTON "Cancel",IDCANCEL,157,238,50,14,NOT WS_TABSTOP
|
||||
GROUPBOX "Mixing Settings",IDC_STATIC,6,5,145,115
|
||||
LTEXT "Interpolation:",IDC_STATIC,12,16,61,10,NOT WS_GROUP
|
||||
COMBOBOX IDC_INTERPOLATE,14,26,129,84,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CHECKBOX "Disable Effects Processing",IDC_EFFECTS_DISABLE,14,47,126,10
|
||||
LTEXT "(speedup!) Skips reverb effects processing, but won't sound as good in most games.",IDC_STATIC,26,59,110,36
|
||||
CONTROL "Use the de-alias filter",IDC_DEALIASFILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,92,126,10
|
||||
LTEXT "(overemphasizes the highs)",IDC_STATIC,26,104,114,12,NOT WS_GROUP
|
||||
GROUPBOX "",IDC_STATIC,6,123,145,45
|
||||
CHECKBOX "Enable Debug Options",IDC_DEBUG_ENABLE,14,135,118,10,NOT WS_TABSTOP
|
||||
PUSHBUTTON "Configure...",IDC_OPEN_CONFIG_DEBUG,14,147,52,13
|
||||
GROUPBOX "Output Settings",IDC_STATIC,157,5,145,225
|
||||
LTEXT "Module:",IDC_STATIC,163,16,50,9,NOT WS_GROUP
|
||||
COMBOBOX IDC_OUTPUT,165,26,129,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure...",IDC_OUTCONF,165,42,52,13
|
||||
LTEXT "Volume:",IDC_STATIC,192,61,27,8,NOT WS_GROUP
|
||||
CTEXT "100%",IDC_VOLUME_LABEL,226,61,58,9
|
||||
CONTROL "",IDC_VOLUME_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,165,72,129,10
|
||||
LTEXT "Latency:",IDC_STATIC,190,86,29,8,NOT WS_GROUP
|
||||
CTEXT "100 ms (avg)",IDC_LATENCY_LABEL,227,86,58,9
|
||||
CONTROL "Slider2",IDC_LATENCY_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,165,96,129,10
|
||||
CONTROL "Synchronizing Mode:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,163,116,133,8
|
||||
COMBOBOX IDC_SYNCHMODE,165,126,129,62,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Advanced...",IDC_OPEN_CONFIG_SOUNDTOUCH,165,142,52,13
|
||||
LTEXT "Audio Expansion Mode:",IDC_SPEAKERS_TEXT,163,162,137,10,NOT WS_GROUP
|
||||
COMBOBOX IDC_SPEAKERS,165,172,129,84,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Use a Winamp DSP plugin",IDC_DSP_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,165,195,129,11
|
||||
LTEXT "(currently requires manual configuration via the ini file)",IDC_STATIC,177,207,100,20
|
||||
GROUPBOX "Mixing Settings",IDC_STATIC,3,5,154,115
|
||||
LTEXT "Interpolation:",IDC_STATIC,9,16,61,10,NOT WS_GROUP
|
||||
COMBOBOX IDC_INTERPOLATE,9,26,145,84,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CHECKBOX "Disable Effects Processing",IDC_EFFECTS_DISABLE,11,47,126,10
|
||||
LTEXT "(speedup!) Skips reverb effects processing, but won't sound as good in most games.",IDC_STATIC,23,59,110,36
|
||||
CONTROL "Use the de-alias filter",IDC_DEALIASFILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,92,126,10
|
||||
LTEXT "(overemphasizes the highs)",IDC_STATIC,23,104,114,12,NOT WS_GROUP
|
||||
GROUPBOX "",IDC_STATIC,3,124,154,45
|
||||
CHECKBOX "Enable Debug Options",IDC_DEBUG_ENABLE,11,135,118,10,NOT WS_TABSTOP
|
||||
PUSHBUTTON "Configure...",IDC_OPEN_CONFIG_DEBUG,11,147,52,13
|
||||
GROUPBOX "Output Settings",IDC_STATIC,165,5,141,225
|
||||
LTEXT "Module:",IDC_STATIC,171,16,50,9,NOT WS_GROUP
|
||||
COMBOBOX IDC_OUTPUT,173,26,130,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure...",IDC_OUTCONF,173,42,52,13
|
||||
LTEXT "Volume:",IDC_STATIC,200,61,27,8,NOT WS_GROUP
|
||||
CTEXT "100%",IDC_VOLUME_LABEL,234,61,58,9
|
||||
CONTROL "",IDC_VOLUME_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,170,72,129,10
|
||||
LTEXT "Latency:",IDC_STATIC,196,86,29,8,NOT WS_GROUP
|
||||
CTEXT "100 ms (avg)",IDC_LATENCY_LABEL,233,86,58,9
|
||||
CONTROL "Slider2",IDC_LATENCY_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,173,96,129,10
|
||||
CONTROL "Synchronizing Mode:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,171,116,133,8
|
||||
COMBOBOX IDC_SYNCHMODE,173,126,129,62,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Advanced...",IDC_OPEN_CONFIG_SOUNDTOUCH,172,142,52,13
|
||||
LTEXT "Audio Expansion Mode:",IDC_SPEAKERS_TEXT,170,162,137,10,NOT WS_GROUP
|
||||
COMBOBOX IDC_SPEAKERS,172,172,129,84,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Use a Winamp DSP plugin",IDC_DSP_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,172,195,129,11
|
||||
LTEXT "(currently requires manual configuration via the ini file)",IDC_STATIC,184,207,100,20
|
||||
END
|
||||
|
||||
IDD_DEBUG DIALOGEX 0, 0, 303, 473
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
@ -451,6 +451,9 @@ void SPU2async(u32 cycles)
|
|||
case 4:
|
||||
printf(" - Catmull-Rom.\n");
|
||||
break;
|
||||
case 5:
|
||||
printf(" - Gaussian.\n");
|
||||
break;
|
||||
default:
|
||||
printf(" (unknown).\n");
|
||||
break;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
@ -30,12 +30,12 @@ MixerTab::MixerTab(wxWindow* parent)
|
|||
top_box->Add(new wxStaticText(this, wxID_ANY, "Interpolation"), wxSizerFlags().Centre());
|
||||
|
||||
wxArrayString interpolation_entries;
|
||||
interpolation_entries.Add("Nearest (Fastest/bad quality)");
|
||||
interpolation_entries.Add("Nearest (Fastest / worst quality)");
|
||||
interpolation_entries.Add("Linear (Simple / okay sound)");
|
||||
interpolation_entries.Add("Cubic (Artificial highs)");
|
||||
interpolation_entries.Add("Hermite (Better highs)");
|
||||
interpolation_entries.Add("Catmull-Rom (PS2-like/slow)");
|
||||
interpolation_entries.Add("Gaussian (SPU native)");
|
||||
interpolation_entries.Add("Cubic (Fake highs / okay sound)");
|
||||
interpolation_entries.Add("Hermite (Better highs / okay sound)");
|
||||
interpolation_entries.Add("Catmull-Rom (PS2-like / good sound)");
|
||||
interpolation_entries.Add("Gaussian (PS2-like / great sound)");
|
||||
|
||||
m_inter_select = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, interpolation_entries);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
|
Loading…
Reference in New Issue