mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
Fix the Audio tab and merge the DSP config into one.
Unify the DSP settings into DSP.ini git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6955 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -16,6 +16,8 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "AudioCommon.h"
|
||||
#include "CommonPaths.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
AudioCommonConfig ac_Config;
|
||||
|
||||
@ -23,7 +25,11 @@ AudioCommonConfig ac_Config;
|
||||
SoundStream *soundStream;
|
||||
|
||||
// Load from given file
|
||||
void AudioCommonConfig::Load(IniFile &file) {
|
||||
void AudioCommonConfig::Load()
|
||||
{
|
||||
IniFile file;
|
||||
file.Load(std::string(File::GetUserPath(F_DSPCONFIG_IDX)).c_str());
|
||||
|
||||
file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true);
|
||||
file.Get("Config", "EnableThrottle", &m_EnableThrottle, true);
|
||||
file.Get("Config", "EnableJIT", &m_EnableJIT, true);
|
||||
@ -41,13 +47,19 @@ void AudioCommonConfig::Load(IniFile &file) {
|
||||
}
|
||||
|
||||
// Set the values for the file
|
||||
void AudioCommonConfig::Set(IniFile &file) {
|
||||
void AudioCommonConfig::SaveSettings()
|
||||
{
|
||||
IniFile file;
|
||||
file.Load(std::string(File::GetUserPath(F_DSPCONFIG_IDX)).c_str());
|
||||
|
||||
file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic);
|
||||
file.Set("Config", "EnableThrottle", m_EnableThrottle);
|
||||
file.Set("Config", "EnableJIT", m_EnableJIT);
|
||||
file.Set("Config", "Backend", sBackend);
|
||||
file.Set("Config", "Frequency", sFrequency);
|
||||
file.Set("Config", "Volume", m_Volume);
|
||||
|
||||
file.Save((std::string(File::GetUserPath(F_DSPCONFIG_IDX)).c_str()));
|
||||
}
|
||||
|
||||
// Update according to the values (stream/mixer)
|
||||
|
Reference in New Issue
Block a user