Adjust default input rate, too.

This commit is contained in:
Brandon Wright 2019-02-19 17:54:57 -06:00
parent aa867abcd3
commit 9c120fe3bf
6 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@
#include "bapu/snes/snes.hpp" #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_SAMPLE_BLOCK = 48;
static const int APU_NUMERATOR_NTSC = 5632; static const int APU_NUMERATOR_NTSC = 5632;
static const int APU_DENOMINATOR_NTSC = 118125; static const int APU_DENOMINATOR_NTSC = 118125;

View File

@ -133,7 +133,7 @@ S9xPortSoundInit ()
Settings.SoundInputRate = top_level->get_auto_input_rate (); Settings.SoundInputRate = top_level->get_auto_input_rate ();
if (Settings.SoundInputRate == 0.0) if (Settings.SoundInputRate == 0.0)
{ {
Settings.SoundInputRate = 31950; Settings.SoundInputRate = 31920;
gui_config->auto_input_rate = 0; gui_config->auto_input_rate = 0;
} }
} }

View File

@ -239,7 +239,7 @@ void S9xLoadConfigFiles (char **argv, int argc)
Settings.Stereo = conf.GetBool("Sound::Stereo", true); Settings.Stereo = conf.GetBool("Sound::Stereo", true);
Settings.ReverseStereo = conf.GetBool("Sound::ReverseStereo", false); Settings.ReverseStereo = conf.GetBool("Sound::ReverseStereo", false);
Settings.SoundPlaybackRate = conf.GetUInt("Sound::Rate", 48000); 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.Mute = conf.GetBool("Sound::Mute", false);
Settings.DynamicRateControl = conf.GetBool("Sound::DynamicRateControl", false); Settings.DynamicRateControl = conf.GetBool("Sound::DynamicRateControl", false);
Settings.DynamicRateLimit = conf.GetInt ("Sound::DynamicRateLimit", 5); Settings.DynamicRateLimit = conf.GetInt ("Sound::DynamicRateLimit", 5);

View File

@ -1485,7 +1485,7 @@ int main (int argc, char **argv)
Settings.SixteenBitSound = TRUE; Settings.SixteenBitSound = TRUE;
Settings.Stereo = TRUE; Settings.Stereo = TRUE;
Settings.SoundPlaybackRate = 48000; Settings.SoundPlaybackRate = 48000;
Settings.SoundInputRate = 31950; Settings.SoundInputRate = 31920;
Settings.SupportHiRes = TRUE; Settings.SupportHiRes = TRUE;
Settings.Transparency = TRUE; Settings.Transparency = TRUE;
Settings.AutoDisplayMessages = TRUE; Settings.AutoDisplayMessages = TRUE;

View File

@ -814,7 +814,7 @@ void WinRegisterConfigItems()
#define CATEGORY "Sound" #define CATEGORY "Sound"
AddIntC("Sync", Settings.SoundSync, 1, "1 to sync emulation to sound output, 0 to disable."); 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("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)"); AddBoolC("Mute", GUI.Mute, false, "true to mute sound output (does not disable the sound CPU)");
AddBool("DynamicRateControl", Settings.DynamicRateControl, false); AddBool("DynamicRateControl", Settings.DynamicRateControl, false);
AddBool("AutomaticInputRate", GUI.AutomaticInputRate, true); AddBool("AutomaticInputRate", GUI.AutomaticInputRate, true);

View File

@ -41,7 +41,7 @@ bool ReInitSound()
else else
{ {
GUI.AutomaticInputRate = false; GUI.AutomaticInputRate = false;
Settings.SoundInputRate = 31950; Settings.SoundInputRate = 31920;
} }
} }