From e48f077f6cda33e387c46ccaa1887eccacfcc7ee Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Fri, 15 Feb 2019 12:59:18 -0600 Subject: [PATCH] win32: Don't encourage 32000Hz sound. It's not relevant or helpful in this case, since sound is resampled anyway, DSP output is actually 32040Hz, the MSU1 is 44100Hz, and the Windows sound server uses 48000Hz by default. --- snes9x.cpp | 2 +- win32/rsrc/snes9x.rc | 2 +- win32/wconfig.cpp | 2 +- win32/wsnes9x.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/snes9x.cpp b/snes9x.cpp index 1be70e0a..a2a9e9da 100644 --- a/snes9x.cpp +++ b/snes9x.cpp @@ -238,7 +238,7 @@ void S9xLoadConfigFiles (char **argv, int argc) Settings.SixteenBitSound = conf.GetBool("Sound::16BitSound", true); Settings.Stereo = conf.GetBool("Sound::Stereo", true); Settings.ReverseStereo = conf.GetBool("Sound::ReverseStereo", false); - Settings.SoundPlaybackRate = conf.GetUInt("Sound::Rate", 32000); + Settings.SoundPlaybackRate = conf.GetUInt("Sound::Rate", 48000); Settings.SoundInputRate = conf.GetUInt("Sound::InputRate", 31950); Settings.Mute = conf.GetBool("Sound::Mute", false); Settings.DynamicRateControl = conf.GetBool("Sound::DynamicRateControl", false); diff --git a/win32/rsrc/snes9x.rc b/win32/rsrc/snes9x.rc index b3954c4f..2cdb99de 100644 --- a/win32/rsrc/snes9x.rc +++ b/win32/rsrc/snes9x.rc @@ -963,7 +963,7 @@ BEGIN MENUITEM "16KHz", ID_SOUND_16000HZ MENUITEM "22KHz", ID_SOUND_22050HZ MENUITEM "30KHz", ID_SOUND_30000HZ - MENUITEM "32KHz (SNES)", ID_SOUND_32000HZ + MENUITEM "32KHz", ID_SOUND_32000HZ MENUITEM "35KHz", ID_SOUND_35000HZ MENUITEM "44KHz", ID_SOUND_44100HZ MENUITEM "48KHz", ID_SOUND_48000HZ diff --git a/win32/wconfig.cpp b/win32/wconfig.cpp index ec7d1283..35a1b8bb 100644 --- a/win32/wconfig.cpp +++ b/win32/wconfig.cpp @@ -812,7 +812,7 @@ void WinRegisterConfigItems() #undef CATEGORY #define CATEGORY "Sound" AddIntC("Sync", Settings.SoundSync, 1, "1 to sync emulation to sound output, 0 to disable."); - AddUIntC("Rate", Settings.SoundPlaybackRate, 44100, "sound playback quality, in Hz"); + AddUIntC("Rate", Settings.SoundPlaybackRate, 48000, "sound playback quality, in Hz"); AddUIntC("InputRate", Settings.SoundInputRate, 31950, "for each 'Input rate' samples generated by the SNES, 'Playback rate' samples will produced. If you experience crackling you can try to lower this setting."); AddBoolC("Mute", GUI.Mute, false, "true to mute sound output (does not disable the sound CPU)"); AddBool("DynamicRateControl", Settings.DynamicRateControl, false); diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 0b33dec3..3b7664af 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -4386,7 +4386,7 @@ INT_PTR CALLBACK DlgSoundConf(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) SendDlgItemMessage(hDlg, IDC_RATE, CB_INSERTSTRING, 2, (LPARAM)TEXT("16 KHz")); SendDlgItemMessage(hDlg, IDC_RATE, CB_INSERTSTRING, 3, (LPARAM)TEXT("22 KHz")); SendDlgItemMessage(hDlg, IDC_RATE, CB_INSERTSTRING, 4, (LPARAM)TEXT("30 KHz")); - SendDlgItemMessage(hDlg, IDC_RATE, CB_INSERTSTRING, 5, (LPARAM)TEXT("32 KHz (SNES)")); + SendDlgItemMessage(hDlg, IDC_RATE, CB_INSERTSTRING, 5, (LPARAM)TEXT("32 KHz")); SendDlgItemMessage(hDlg, IDC_RATE, CB_INSERTSTRING, 6, (LPARAM)TEXT("35 KHz")); SendDlgItemMessage(hDlg, IDC_RATE, CB_INSERTSTRING, 7, (LPARAM)TEXT("44 KHz")); SendDlgItemMessage(hDlg, IDC_RATE, CB_INSERTSTRING, 8, (LPARAM)TEXT("48 KHz"));