summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/AudioCommon.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-31 07:01:44 -0400
committerLioncash <mathew1800@gmail.com>2019-05-31 07:01:47 -0400
commit1a56e9d9e096db7e7f0e219776c3bbc8397cd296 (patch)
treee04ea4a5cee2c23d83d3995acc94d39a97469177 /Source/Core/AudioCommon/AudioCommon.cpp
parent00ecfb3c598ec08e5863db9c697e91ab5a4965bf (diff)
AudioCommon: Use std::string_view with feature querying functions
Provides the same behavior, but allows passed in strings to be non-allocating in calling code.
Diffstat (limited to 'Source/Core/AudioCommon/AudioCommon.cpp')
-rw-r--r--Source/Core/AudioCommon/AudioCommon.cpp6
1 files changed, 3 insertions, 3 deletions
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<std::string> 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