From 9c120fe3bf2d2fbb97cb7c906902e63f13d82789 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Tue, 19 Feb 2019 17:54:57 -0600 Subject: [PATCH] Adjust default input rate, too. --- apu/apu.cpp | 2 +- gtk/src/gtk_sound.cpp | 2 +- snes9x.cpp | 2 +- unix/unix.cpp | 2 +- win32/wconfig.cpp | 2 +- win32/win32_sound.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apu/apu.cpp b/apu/apu.cpp index efa815e6..fd4822e0 100644 --- a/apu/apu.cpp +++ b/apu/apu.cpp @@ -15,7 +15,7 @@ #include "bapu/snes/snes.hpp" -static const int APU_DEFAULT_INPUT_RATE = 31950; // ~59.94Hz +static const int APU_DEFAULT_INPUT_RATE = 31920; // ~59.94Hz static const int APU_SAMPLE_BLOCK = 48; static const int APU_NUMERATOR_NTSC = 5632; static const int APU_DENOMINATOR_NTSC = 118125; diff --git a/gtk/src/gtk_sound.cpp b/gtk/src/gtk_sound.cpp index 9948da2f..8b3bd764 100644 --- a/gtk/src/gtk_sound.cpp +++ b/gtk/src/gtk_sound.cpp @@ -133,7 +133,7 @@ S9xPortSoundInit () Settings.SoundInputRate = top_level->get_auto_input_rate (); if (Settings.SoundInputRate == 0.0) { - Settings.SoundInputRate = 31950; + Settings.SoundInputRate = 31920; gui_config->auto_input_rate = 0; } } diff --git a/snes9x.cpp b/snes9x.cpp index a2a9e9da..4437a632 100644 --- a/snes9x.cpp +++ b/snes9x.cpp @@ -239,7 +239,7 @@ void S9xLoadConfigFiles (char **argv, int argc) Settings.Stereo = conf.GetBool("Sound::Stereo", true); Settings.ReverseStereo = conf.GetBool("Sound::ReverseStereo", false); Settings.SoundPlaybackRate = conf.GetUInt("Sound::Rate", 48000); - Settings.SoundInputRate = conf.GetUInt("Sound::InputRate", 31950); + Settings.SoundInputRate = conf.GetUInt("Sound::InputRate", 31920); Settings.Mute = conf.GetBool("Sound::Mute", false); Settings.DynamicRateControl = conf.GetBool("Sound::DynamicRateControl", false); Settings.DynamicRateLimit = conf.GetInt ("Sound::DynamicRateLimit", 5); diff --git a/unix/unix.cpp b/unix/unix.cpp index 7d1e3805..5da2b9c6 100644 --- a/unix/unix.cpp +++ b/unix/unix.cpp @@ -1485,7 +1485,7 @@ int main (int argc, char **argv) Settings.SixteenBitSound = TRUE; Settings.Stereo = TRUE; Settings.SoundPlaybackRate = 48000; - Settings.SoundInputRate = 31950; + Settings.SoundInputRate = 31920; Settings.SupportHiRes = TRUE; Settings.Transparency = TRUE; Settings.AutoDisplayMessages = TRUE; diff --git a/win32/wconfig.cpp b/win32/wconfig.cpp index 44255649..aa01fb8f 100644 --- a/win32/wconfig.cpp +++ b/win32/wconfig.cpp @@ -814,7 +814,7 @@ void WinRegisterConfigItems() #define CATEGORY "Sound" AddIntC("Sync", Settings.SoundSync, 1, "1 to sync emulation to sound output, 0 to disable."); 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."); + AddUIntC("InputRate", Settings.SoundInputRate, 31920, "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); AddBool("AutomaticInputRate", GUI.AutomaticInputRate, true); diff --git a/win32/win32_sound.cpp b/win32/win32_sound.cpp index ad685f40..dc3de805 100644 --- a/win32/win32_sound.cpp +++ b/win32/win32_sound.cpp @@ -41,7 +41,7 @@ bool ReInitSound() else { GUI.AutomaticInputRate = false; - Settings.SoundInputRate = 31950; + Settings.SoundInputRate = 31920; } }