diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index 1ffc377c56..79a89f83f9 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -117,7 +117,7 @@ std::vector GetSoundBackends() return backends; } -bool SupportsDPL2Decoder(const std::string& backend) +bool SupportsDPL2Decoder(std::string_view backend) { #ifndef __APPLE__ if (backend == BACKEND_OPENAL) @@ -132,12 +132,12 @@ bool SupportsDPL2Decoder(const std::string& backend) return false; } -bool SupportsLatencyControl(const std::string& backend) +bool SupportsLatencyControl(std::string_view backend) { return backend == BACKEND_OPENAL || backend == BACKEND_WASAPI; } -bool SupportsVolumeChanges(const std::string& backend) +bool SupportsVolumeChanges(std::string_view backend) { // FIXME: this one should ask the backend whether it supports it. // but getting the backend from string etc. is probably diff --git a/Source/Core/AudioCommon/AudioCommon.h b/Source/Core/AudioCommon/AudioCommon.h index 6925fe3d7b..d4dbd84a48 100644 --- a/Source/Core/AudioCommon/AudioCommon.h +++ b/Source/Core/AudioCommon/AudioCommon.h @@ -6,6 +6,7 @@ #include #include +#include #include #include "AudioCommon/SoundStream.h" @@ -20,9 +21,9 @@ void InitSoundStream(); void ShutdownSoundStream(); std::string GetDefaultSoundBackend(); std::vector GetSoundBackends(); -bool SupportsDPL2Decoder(const std::string& backend); -bool SupportsLatencyControl(const std::string& backend); -bool SupportsVolumeChanges(const std::string& backend); +bool SupportsDPL2Decoder(std::string_view backend); +bool SupportsLatencyControl(std::string_view backend); +bool SupportsVolumeChanges(std::string_view backend); void UpdateSoundStream(); void SetSoundStreamRunning(bool running); void SendAIBuffer(const short* samples, unsigned int num_samples);