void AudioConfigPane::LoadGUIValues() { const SConfig& startup_params = SConfig::GetInstance(); PopulateBackendChoiceBox(); ToggleBackendSpecificControls(SConfig::GetInstance().sBackend); // Audio DSP Engine if (startup_params.bDSPHLE) m_dsp_engine_radiobox->SetSelection(0); else m_dsp_engine_radiobox->SetSelection(SConfig::GetInstance().m_DSPEnableJIT ? 1 : 2); m_volume_slider->SetValue(SConfig::GetInstance().m_Volume); m_volume_text->SetLabel(wxString::Format("%d %%", SConfig::GetInstance().m_Volume)); m_dpl2_decoder_checkbox->SetValue(startup_params.bDPL2Decoder); if (m_latency_control_supported) { m_audio_latency_spinctrl->SetValue(startup_params.iLatency); } m_stretch_checkbox->SetValue(startup_params.m_audio_stretch); m_stretch_slider->Enable(startup_params.m_audio_stretch); m_stretch_slider->SetValue(startup_params.m_audio_stretch_max_latency); m_stretch_text->Enable(startup_params.m_audio_stretch); m_stretch_text->SetLabel(wxString::Format("%d ms", startup_params.m_audio_stretch_max_latency)); m_stretch_label->Enable(startup_params.m_audio_stretch); }
void AudioConfigPane::LoadGUIValues() { PopulateBackendChoiceBox(); const SConfig& startup_params = SConfig::GetInstance(); // Audio DSP Engine if (startup_params.bDSPHLE) m_dsp_engine_radiobox->SetSelection(0); else m_dsp_engine_radiobox->SetSelection(SConfig::GetInstance().m_DSPEnableJIT ? 1 : 2); m_volume_slider->Enable(SupportsVolumeChanges(SConfig::GetInstance().sBackend)); m_volume_slider->SetValue(SConfig::GetInstance().m_Volume); m_volume_text->SetLabel(wxString::Format("%d %%", SConfig::GetInstance().m_Volume)); m_dpl2_decoder_checkbox->Enable(std::string(SConfig::GetInstance().sBackend) == BACKEND_OPENAL || std::string(SConfig::GetInstance().sBackend) == BACKEND_PULSEAUDIO); m_dpl2_decoder_checkbox->SetValue(startup_params.bDPL2Decoder); m_audio_latency_spinctrl->Enable(std::string(SConfig::GetInstance().sBackend) == BACKEND_OPENAL); m_audio_latency_spinctrl->SetValue(startup_params.iLatency); }