From 45903b7b4de4a0e6f64eebde0fdedd648b1be87a Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Sun, 9 Oct 2016 19:18:16 -0700 Subject: AudioCommon: SupportsDPL2Decoder, SupportsLatencyControl, SupportsVolumeChanges --- Source/Core/AudioCommon/AudioCommon.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'Source/Core/AudioCommon/AudioCommon.cpp') diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index dd0b31b916..642051f166 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -117,6 +117,30 @@ std::vector GetSoundBackends() return backends; } +bool SupportsDPL2Decoder(const std::string& backend) +{ +#ifndef __APPLE__ + if (backend == BACKEND_OPENAL) + return true; +#endif + if (backend == BACKEND_PULSEAUDIO) + return true; + return false; +} + +bool SupportsLatencyControl(const std::string& backend) +{ + return backend == BACKEND_OPENAL; +} + +bool SupportsVolumeChanges(const std::string& backend) +{ + // FIXME: this one should ask the backend whether it supports it. + // but getting the backend from string etc. is probably + // too much just to enable/disable a stupid slider... + return backend == BACKEND_COREAUDIO || backend == BACKEND_OPENAL || backend == BACKEND_XAUDIO2; +} + void UpdateSoundStream() { if (g_sound_stream) -- cgit v1.2.3