summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-04-22 12:07:43 -0400
committerGitHub <noreply@github.com>2025-04-22 12:07:43 -0400
commitfd8ce3ce8062a911e9cb73a725b31df3ad99efa0 (patch)
treedb1e4554551c33e5909bb8e73d22651548af15e4 /Source
parent12010ebf78006505ba2e91bbe7c660e3792d87a6 (diff)
parent1fc6be7f80f55786a8a7bd80e70f3bc6d4dcd4d9 (diff)
Merge pull request #13555 from jordan-woyak/cubeb-default
AudioCommon: Make cubeb sound backend default on Linux.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/AudioCommon/AudioCommon.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp
index 0a0aafd307..de046a9aab 100644
--- a/Source/Core/AudioCommon/AudioCommon.cpp
+++ b/Source/Core/AudioCommon/AudioCommon.cpp
@@ -14,7 +14,6 @@
#include "AudioCommon/OpenSLESStream.h"
#include "AudioCommon/PulseAudioStream.h"
#include "AudioCommon/WASAPIStream.h"
-#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "Common/Logging/Log.h"
#include "Core/Config/MainSettings.h"
@@ -94,19 +93,19 @@ void ShutdownSoundStream(Core::System& system)
std::string GetDefaultSoundBackend()
{
- std::string backend = BACKEND_NULLSOUND;
-#if defined ANDROID
- backend = BACKEND_OPENSLES;
-#elif defined __linux__
- if (AlsaSound::IsValid())
- backend = BACKEND_ALSA;
- else if (CubebStream::IsValid())
- backend = BACKEND_CUBEB;
-#elif defined(__APPLE__) || defined(_WIN32) || defined(__OpenBSD__)
+#if defined(ANDROID)
+ return BACKEND_OPENSLES;
+#else
if (CubebStream::IsValid())
- backend = BACKEND_CUBEB;
+ return BACKEND_CUBEB;
#endif
- return backend;
+
+#if defined(__linux__)
+ if (AlsaSound::IsValid())
+ return BACKEND_ALSA;
+#endif
+
+ return BACKEND_NULLSOUND;
}
DPL2Quality GetDefaultDPL2Quality()