Moved the Audio Throttle option to the Framelimit drop-down. The Audio Throttle should never be used alongside the frame limiter as that can cause audio sync issues.

This commit is contained in:
skidau 2012-01-01 14:32:54 +11:00
parent cfee6d8473
commit c53593a40a
5 changed files with 9 additions and 16 deletions

View File

@ -18,6 +18,7 @@
#include "AudioCommon.h"
#include "CommonPaths.h"
#include "FileUtil.h"
#include "..\..\Core\Src\ConfigManager.h"
AudioCommonConfig ac_Config;
@ -31,7 +32,6 @@ void AudioCommonConfig::Load()
file.Load(File::GetUserPath(F_DSPCONFIG_IDX));
file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true);
file.Get("Config", "EnableThrottle", &m_EnableThrottle, true);
file.Get("Config", "EnableJIT", &m_EnableJIT, true);
file.Get("Config", "DumpAudio", &m_DumpAudio, false);
#if defined __linux__ && HAVE_ALSA
@ -54,7 +54,6 @@ void AudioCommonConfig::SaveSettings()
file.Load(File::GetUserPath(F_DSPCONFIG_IDX));
file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic);
file.Set("Config", "EnableThrottle", m_EnableThrottle);
file.Set("Config", "EnableJIT", m_EnableJIT);
file.Set("Config", "DumpAudio", m_DumpAudio);
file.Set("Config", "Backend", sBackend);
@ -67,7 +66,7 @@ void AudioCommonConfig::SaveSettings()
// Update according to the values (stream/mixer)
void AudioCommonConfig::Update() {
if (soundStream) {
soundStream->GetMixer()->SetThrottle(m_EnableThrottle);
soundStream->GetMixer()->SetThrottle(SConfig::GetInstance().m_Framelimit == 2);
soundStream->GetMixer()->SetDTKMusic(m_EnableDTKMusic);
soundStream->SetVolume(m_Volume);
}

View File

@ -34,7 +34,6 @@
struct AudioCommonConfig
{
bool m_EnableDTKMusic;
bool m_EnableThrottle;
bool m_EnableJIT;
bool m_DumpAudio;
int m_Volume;

View File

@ -547,11 +547,11 @@ void RequestRefreshInfo()
// This should only be called from VI
void VideoThrottle()
{
u32 TargetVPS = (SConfig::GetInstance().m_Framelimit > 1) ?
SConfig::GetInstance().m_Framelimit * 5 : VideoInterface::TargetRefreshRate;
u32 TargetVPS = (SConfig::GetInstance().m_Framelimit > 2) ?
(SConfig::GetInstance().m_Framelimit - 1) * 5 : VideoInterface::TargetRefreshRate;
// Disable the frame-limiter when the throttle (Tab) key is held down
if (SConfig::GetInstance().m_Framelimit && !Host_GetKeyState('\t'))
// Disable the frame-limiter when the throttle (Tab) key is held down. Audio throttle: m_Framelimit = 2
if (SConfig::GetInstance().m_Framelimit && SConfig::GetInstance().m_Framelimit != 2 && !Host_GetKeyState('\t'))
{
u32 frametime = ((SConfig::GetInstance().b_UseFPS)? Common::AtomicLoad(DrawnFrame) : DrawnVideo) * 1000 / TargetVPS;

View File

@ -238,6 +238,7 @@ void CConfigMain::InitializeGUILists()
// Framelimit
arrayStringFor_Framelimit.Add(_("Off"));
arrayStringFor_Framelimit.Add(_("Auto"));
arrayStringFor_Framelimit.Add(_("Audio"));
for (int i = 10; i <= 120; i += 5) // from 10 to 120
arrayStringFor_Framelimit.Add(wxString::Format(wxT("%i"), i));
@ -360,7 +361,6 @@ void CConfigMain::InitializeGUIValues()
VolumeText->SetLabel(wxString::Format(wxT("%d %%"), ac_Config.m_Volume));
EnableDTKMusic->SetValue(ac_Config.m_EnableDTKMusic ? true : false);
DSPThread->SetValue(startup_params.bDSPThread);
EnableThrottle->SetValue(ac_Config.m_EnableThrottle ? true : false);
DumpAudio->SetValue(ac_Config.m_DumpAudio ? true : false);
FrequencySelection->SetSelection(
FrequencySelection->FindString(wxString::Format(_("%d Hz"), ac_Config.iFrequency)));
@ -484,7 +484,7 @@ void CConfigMain::InitializeGUITooltips()
{
// General - Basic
CPUThread->SetToolTip(_("This splits the Video and CPU threads, so they can be run on separate cores.\nCauses major speed improvements on PCs with more than one core, but can also cause occasional crashes/glitches."));
Framelimit->SetToolTip(_("If you set Framelimit higher than game full speed (NTSC:60, PAL:50), you also have to disable Audio Throttle in DSP to make it effective."));
Framelimit->SetToolTip(_("If you set Framelimit higher than game full speed (NTSC:60, PAL:50). Use Audio to throttle using the DSP (might fix audio clicks but can also cause constant noise depending on the game)."));
// General - Advanced
_NTSCJ->SetToolTip(_("Forces NTSC-J mode for using the Japanese ROM font.\nLeft unchecked, dolphin defaults to NTSC-U and automatically enables this setting when playing Japanese games."));
@ -504,7 +504,6 @@ void CConfigMain::InitializeGUITooltips()
// Audio tooltips
EnableDTKMusic->SetToolTip(_("This is used to play music tracks, like BGM."));
DSPThread->SetToolTip(_("Run DSP LLE on a dedicated thread (not recommended)."));
EnableThrottle->SetToolTip(_("This is used to control game speed by sound throttle.\nDisabling this could cause abnormal game speed, such as too fast.\nBut sometimes enabling this could cause constant noise.\n\nKeyboard Shortcut <TAB>: Hold down to instantly disable Throttle."));
FrequencySelection->SetToolTip(_("Changing this will have no effect while the emulator is running!"));
BackendSelection->SetToolTip(_("Changing this will have no effect while the emulator is running!"));
@ -606,8 +605,6 @@ void CConfigMain::CreateGUIControls()
EnableDTKMusic = new wxCheckBox(AudioPage, ID_ENABLE_DTK_MUSIC, _("Enable DTK Music"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
DSPThread = new wxCheckBox(AudioPage, ID_DSPTHREAD, _("DSP LLE on Thread"));
EnableThrottle = new wxCheckBox(AudioPage, ID_ENABLE_THROTTLE, _("Enable Audio Throttle"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
DumpAudio = new wxCheckBox(AudioPage, ID_DUMP_AUDIO, _("Dump Audio"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
VolumeSlider = new wxSlider(AudioPage, ID_VOLUME, 0, 1, 100,
@ -625,7 +622,6 @@ void CConfigMain::CreateGUIControls()
sbAudioSettings->Add(DSPEngine, 0, wxALL | wxEXPAND, 5);
sbAudioSettings->Add(EnableDTKMusic, 0, wxALL, 5);
sbAudioSettings->Add(DSPThread, 0, wxALL, 5);
sbAudioSettings->Add(EnableThrottle, 0, wxALL, 5);
sbAudioSettings->Add(DumpAudio, 0, wxALL, 5);
wxStaticBoxSizer *sbVolume = new wxStaticBoxSizer(wxVERTICAL, AudioPage, _("Volume"));
@ -841,6 +837,7 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
break;
case ID_FRAMELIMIT:
SConfig::GetInstance().m_Framelimit = Framelimit->GetSelection();
ac_Config.Update();
break;
case ID_FRAMELIMIT_USEFPSFORLIMITING:
SConfig::GetInstance().b_UseFPS = UseFPSForLimiting->IsChecked();
@ -922,7 +919,6 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
default:
ac_Config.m_EnableDTKMusic = EnableDTKMusic->GetValue();
ac_Config.m_EnableThrottle = EnableThrottle->GetValue();
ac_Config.m_DumpAudio = DumpAudio->GetValue();
long int frequency;

View File

@ -157,7 +157,6 @@ private:
wxSlider* VolumeSlider;
wxStaticText* VolumeText;
wxCheckBox* EnableDTKMusic;
wxCheckBox* EnableThrottle;
wxCheckBox* DumpAudio;
wxArrayString wxArrayBackends;
wxChoice* BackendSelection;