summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/AudioCommon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/AudioCommon/AudioCommon.cpp')
-rw-r--r--Source/Core/AudioCommon/AudioCommon.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp
index 1ffb323a3f..86d3d5943e 100644
--- a/Source/Core/AudioCommon/AudioCommon.cpp
+++ b/Source/Core/AudioCommon/AudioCommon.cpp
@@ -92,6 +92,22 @@ void ShutdownSoundStream()
INFO_LOG(AUDIO, "Done shutting down sound stream");
}
+std::string GetDefaultSoundBackend()
+{
+ std::string backend = BACKEND_NULLSOUND;
+#if defined __linux__
+ if (AlsaSound::isValid())
+ backend = BACKEND_ALSA;
+#elif defined __APPLE__
+ backend = BACKEND_COREAUDIO;
+#elif defined _WIN32
+ backend = BACKEND_XAUDIO2;
+#elif defined ANDROID
+ backend = BACKEND_OPENSLES;
+#endif
+ return backend;
+}
+
std::vector<std::string> GetSoundBackends()
{
std::vector<std::string> backends;