Change the audio sample rate setting to a numerical value. Fixes issue 4045. You may have to change the setting once after this commit to update your ini file from the string that was saved there before.

Update translation pot file to reflect recent gui changes, and update a few of the languages.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7059 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2011-02-04 04:54:25 +00:00
parent 9c1a182cca
commit d5f6d2bbae
25 changed files with 13718 additions and 13374 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -42,7 +42,7 @@ void AudioCommonConfig::Load()
#else
file.Get("Config", "Backend", &sBackend, BACKEND_NULLSOUND);
#endif
file.Get("Config", "Frequency", &sFrequency, "48,000 Hz");
file.Get("Config", "Frequency", &sFrequency, 48000);
file.Get("Config", "Volume", &m_Volume, 100);
}

View File

@ -38,7 +38,7 @@ struct AudioCommonConfig
bool m_EnableJIT;
int m_Volume;
std::string sBackend;
std::string sFrequency;
int sFrequency;
// Load from given file
void Load();

View File

@ -192,16 +192,11 @@ u16 DSPHLE::DSP_WriteControlRegister(unsigned short _Value)
{
if (!Temp.DSPHalt && Temp.DSPInit)
{
unsigned int AISampleRate, DACSampleRate, BackendSampleRate;
unsigned int AISampleRate, DACSampleRate;
AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate);
std::string frequency = ac_Config.sFrequency;
if (frequency == "48,000 Hz")
BackendSampleRate = 48000;
else
BackendSampleRate = 32000;
soundStream = AudioCommon::InitSoundStream(
new HLEMixer(this, AISampleRate, DACSampleRate, BackendSampleRate), m_hWnd);
new HLEMixer(this, AISampleRate, DACSampleRate, ac_Config.sFrequency), m_hWnd);
if(!soundStream) PanicAlert("Error starting up sound stream");
// Mixer is initialized
m_InitMixer = true;

View File

@ -397,7 +397,7 @@ void CConfigMain::InitializeGUIValues()
EnableDTKMusic->SetValue(ac_Config.m_EnableDTKMusic ? true : false);
EnableThrottle->SetValue(ac_Config.m_EnableThrottle ? true : false);
FrequencySelection->SetSelection(
FrequencySelection->FindString(wxString::FromAscii(ac_Config.sFrequency.c_str())));
FrequencySelection->FindString(wxString::Format(_("%d Hz"), ac_Config.sFrequency)));
// add backends to the list
AddAudioBackends();
@ -717,8 +717,8 @@ void CConfigMain::CreateGUIControls()
BackendSelection = new wxChoice(AudioPage, ID_BACKEND, wxDefaultPosition,
wxDefaultSize, wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
FrequencySelection = new wxChoice(AudioPage, ID_FREQUENCY);
FrequencySelection->Append(_("48,000 Hz"));
FrequencySelection->Append(_("32,000 Hz"));
FrequencySelection->Append(wxString::Format(_("%d Hz"), 48000));
FrequencySelection->Append(wxString::Format(_("%d Hz"), 32000));
// Create sizer and add items to dialog
wxStaticBoxSizer *sbAudioSettings = new wxStaticBoxSizer(wxVERTICAL, AudioPage, _("Sound Settings"));
@ -1069,7 +1069,9 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
ac_Config.m_EnableDTKMusic = EnableDTKMusic->GetValue();
ac_Config.m_EnableThrottle = EnableThrottle->GetValue();
ac_Config.sBackend = BackendSelection->GetStringSelection().mb_str();
ac_Config.sFrequency = FrequencySelection->GetStringSelection().mb_str();
long int frequency;
FrequencySelection->GetStringSelection().ToLong(&frequency);
ac_Config.sFrequency = frequency;
ac_Config.Update();
break;
}

View File

@ -229,16 +229,16 @@ void VideoBackend::Shutdown()
s_swapRequested = false;
DLCache::Shutdown();
Fifo_Shutdown();
OGL::PostProcessing::Shutdown();
PostProcessing::Shutdown();
// The following calls are NOT Thread Safe
// And need to be called from the video thread
OGL::TextureConverter::Shutdown();
TextureConverter::Shutdown();
VertexLoaderManager::Shutdown();
OGL::VertexShaderCache::Shutdown();
VertexShaderCache::Shutdown();
VertexShaderManager::Shutdown();
PixelShaderManager::Shutdown();
OGL::PixelShaderCache::Shutdown();
PixelShaderCache::Shutdown();
delete g_vertex_manager;
delete g_texture_cache;
OpcodeDecoder_Shutdown();