mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user