Skip to content

Commit

Permalink
SPU2: purge DSound & log + config fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GovanifY authored and refractionpcsx2 committed Oct 3, 2020
1 parent c8abed3 commit 7d917af
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 549 deletions.
1 change: 0 additions & 1 deletion pcsx2/SPU2/SndOut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ SndOutModule* mods[] =
&NullOut,
#ifdef _MSC_VER
XAudio2Out,
DSoundOut,
WaveOut,
#endif
#if defined(SPU2X_PORTAUDIO)
Expand Down
1 change: 0 additions & 1 deletion pcsx2/SPU2/SndOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,6 @@ class SndOutModule
#ifdef _MSC_VER
//internal
extern SndOutModule* WaveOut;
extern SndOutModule* DSoundOut;
extern SndOutModule* XAudio2Out;
#endif
#if defined(SPU2X_PORTAUDIO)
Expand Down
1 change: 0 additions & 1 deletion pcsx2/SPU2/Windows/CfgHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ void initIni()
void CfgSetSettingsDir(const char* dir)
{
initIni();
CfgFile = Path::Combine((dir == nullptr) ? wxString(L"inis") : wxString::FromUTF8(dir), L"SPU2.ini");
}


Expand Down
9 changes: 2 additions & 7 deletions pcsx2/SPU2/Windows/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,10 @@ void ReadSettings()
dspPluginModule = CfgReadInt(L"DSP PLUGIN", L"ModuleNum", 0);
dspPluginEnabled = CfgReadBool(L"DSP PLUGIN", L"Enabled", false);

// Read DSOUNDOUT and WAVEOUT configs:
// Read WAVEOUT configs:
CfgReadStr(L"WAVEOUT", L"Device", Config_WaveOut.Device, L"default");
Config_WaveOut.NumBuffers = CfgReadInt(L"WAVEOUT", L"Buffer_Count", 4);

DSoundOut->ReadSettings();
PortaudioOut->ReadSettings();

SoundtouchCfg::ReadSettings();
Expand All @@ -155,8 +154,6 @@ void ReadSettings()
{
// Unsupported or legacy module.
fwprintf(stderr, L"* SPU2: Unknown output module '%s' specified in configuration file.\n", omodid);
fprintf(stderr, "* SPU2: Defaulting to DirectSound (%S).\n", DSoundOut->GetIdent());
OutputModule = FindOutputModuleById(DSoundOut->GetIdent());
}
}

Expand Down Expand Up @@ -197,7 +194,6 @@ void WriteSettings()
CfgWriteBool(L"DSP PLUGIN", L"Enabled", dspPluginEnabled);

PortaudioOut->WriteSettings();
DSoundOut->WriteSettings();
SoundtouchCfg::WriteSettings();
DebugConfig::WriteSettings();
}
Expand All @@ -207,8 +203,7 @@ void CheckOutputModule(HWND window)
OutputModule = SendMessage(GetDlgItem(window, IDC_OUTPUT), CB_GETCURSEL, 0, 0);
const bool IsConfigurable =
mods[OutputModule] == PortaudioOut ||
mods[OutputModule] == WaveOut ||
mods[OutputModule] == DSoundOut;
mods[OutputModule] == WaveOut;

const bool AudioExpansion =
mods[OutputModule] == XAudio2Out ||
Expand Down
5 changes: 0 additions & 5 deletions pcsx2/SPU2/Windows/Dialogs.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ extern int CfgReadInt(const TCHAR* Section, const TCHAR* Name, int Default);
extern float CfgReadFloat(const TCHAR* Section, const TCHAR* Name, float Default);

// Items Specific to DirectSound
#define STRFY(x) #x
#define verifyc(x) Verifyc(x, STRFY(x))

extern void Verifyc(HRESULT hr, const char* fn);

struct ds_device_data
{
wxString name;
Expand Down
27 changes: 0 additions & 27 deletions pcsx2/SPU2/Windows/SPU2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,6 @@ BEGIN
DEFPUSHBUTTON "Close",IDOK,246,451,50,14
END

IDD_DSOUND DIALOGEX 0, 0, 196, 218
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "DirectSound Output Module Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,45,196,50,14
PUSHBUTTON "Cancel",IDCANCEL,102,196,50,14
COMBOBOX IDC_DS_DEVICE,8,13,180,62,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "DirectSound Device:",IDC_STATIC,6,3,65,8
CONTROL "",IDC_BUFFERS_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,40,137,108,10
LTEXT "Increase the buffer count if you are experiencing loopy or stuttery audio even when games run at high FPS.",IDC_STATIC,13,157,169,27
CTEXT "8 (80 ms latency)",IDC_LATENCY_LABEL,46,123,95,11
LTEXT "The options above are useful for compatibility with older and/or buggy sound drivers ONLY, and should not be checked unless you experience sound problems (such as crackly audio or silence).",IDC_STATIC,18,68,172,38
CONTROL "Disable Global Focus",IDC_GLOBALFOCUS_DISABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,6,38,140,10
CONTROL "Use a crappy alternate buffering mode",IDC_USE_HARDWARE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,53,140,10
GROUPBOX "Output Buffers",IDC_STATIC,6,111,183,77
END

IDD_WAVEOUT DIALOGEX 0, 0, 170, 122
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "WaveOut Output Module Settings"
Expand Down Expand Up @@ -179,14 +160,6 @@ BEGIN
BOTTOMMARGIN, 465
END

IDD_DSOUND, DIALOG
BEGIN
LEFTMARGIN, 4
RIGHTMARGIN, 191
TOPMARGIN, 3
BOTTOMMARGIN, 214
END

IDD_WAVEOUT, DIALOG
BEGIN
LEFTMARGIN, 4
Expand Down
Loading

0 comments on commit 7d917af

Please sign in to comment.