mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
AudioCommon: Move logic for default sound backend there from ConfigManager
This way, we don't have to leak the HAVE_ALSA define there.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user