summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/AudioCommon')
-rw-r--r--Source/Core/AudioCommon/Src/AudioCommonConfig.cpp7
-rw-r--r--Source/Core/AudioCommon/Src/AudioCommonConfig.h5
2 files changed, 9 insertions, 3 deletions
diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp
index 476918771e..c46a1edfbe 100644
--- a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp
+++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp
@@ -1,5 +1,4 @@
#include "AudioCommon.h"
-
AudioCommonConfig ac_Config;
// Load from given file
@@ -8,6 +7,10 @@ void AudioCommonConfig::Load(IniFile &file) {
file.Get("Config", "EnableThrottle", &m_EnableThrottle, true);
#ifdef _WIN32
file.Get("Config", "Backend", &sBackend, "DSound");
+#elif defined(__APPLE__)
+ std::string temp;
+ file.Get("Config", "Backend", &temp, "AOSound");
+ strncpy(sBackend, temp.c_str(), 128);
#else
file.Get("Config", "Backend", &sBackend, "AOSound");
#endif
@@ -17,7 +20,7 @@ void AudioCommonConfig::Load(IniFile &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());
+ file.Set("Config", "Backend", sBackend);
}
// Update according to the values (stream/mixer)
diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.h b/Source/Core/AudioCommon/Src/AudioCommonConfig.h
index aeceed2486..19b0db90ef 100644
--- a/Source/Core/AudioCommon/Src/AudioCommonConfig.h
+++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.h
@@ -9,12 +9,15 @@
#define BACKEND_AOSOUND "AOSound"
#define BACKEND_OPENAL "OpenAL"
#define BACKEND_NULL "NullSound"
-
struct AudioCommonConfig
{
bool m_EnableDTKMusic;
bool m_EnableThrottle;
+#ifdef __APPLE__
+ char sBackend[128];
+#else
std::string sBackend;
+#endif
// Load from given file
void Load(IniFile &file);