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:
sl1nk3.s
2011-01-29 04:16:05 +00:00
parent a2959b96c2
commit a8e2e9ec54
20 changed files with 299 additions and 719 deletions

View File

@ -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)