diff options
| author | nakeee <nakeee@gmail.com> | 2009-03-30 09:55:50 +0000 |
|---|---|---|
| committer | nakeee <nakeee@gmail.com> | 2009-03-30 09:55:50 +0000 |
| commit | 37d513c53bad6fe80b0120773da8be50248da3df (patch) | |
| tree | a649d8c6519fe9d4f8d88aa0f39dec5d985de0e8 /Source/Core/AudioCommon/Src/AudioCommonConfig.cpp | |
| parent | 5987dbf7baaf19d8eed828b6a5555559a20766fe (diff) | |
Added dtk sound mixing to audiocommon (should work with LLE now)
And also moved all common setting to audiocommonconfig
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2796 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/AudioCommon/Src/AudioCommonConfig.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/Src/AudioCommonConfig.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp new file mode 100644 index 0000000000..476918771e --- /dev/null +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp @@ -0,0 +1,29 @@ +#include "AudioCommon.h" + +AudioCommonConfig ac_Config; + +// Load from given file +void AudioCommonConfig::Load(IniFile &file) { + file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true); + file.Get("Config", "EnableThrottle", &m_EnableThrottle, true); +#ifdef _WIN32 + file.Get("Config", "Backend", &sBackend, "DSound"); +#else + file.Get("Config", "Backend", &sBackend, "AOSound"); +#endif +} + +// Set the values for the file +void AudioCommonConfig::Set(IniFile &file) { + file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic); + file.Set("Config", "EnableThrottle", m_EnableThrottle); + file.Set("Config", "Backend", sBackend.c_str()); +} + +// Update according to the values (stream/mixer) +void AudioCommonConfig::Update() { + if (soundStream) { + soundStream->GetMixer()->SetThrottle(m_EnableThrottle); + soundStream->GetMixer()->SetDTKMusic(m_EnableDTKMusic); + } +} |
