aboutsummaryrefslogtreecommitdiffstats
path: root/alc/panning.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-10-23 07:51:06 -0700
committerChris Robinson <[email protected]>2021-10-23 07:51:06 -0700
commitd0e5e138e279f40f92b7d41d885695a206ec36c0 (patch)
tree5edc0e4bd84ad92d6722cb140d347860180a6ff0 /alc/panning.cpp
parent0e93fc53f4cf5bdc749a23a46573d690b2f1c443 (diff)
Use a flag to indicate headphone-like output
Diffstat (limited to 'alc/panning.cpp')
-rw-r--r--alc/panning.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/alc/panning.cpp b/alc/panning.cpp
index bb600241..7b2215a4 100644
--- a/alc/panning.cpp
+++ b/alc/panning.cpp
@@ -921,25 +921,11 @@ void aluInitRenderer(ALCdevice *device, int hrtf_id, al::optional<bool> hrtfreq)
return;
}
- bool headphones{device->IsHeadphones};
- if(device->Type != DeviceType::Loopback)
- {
- if(auto modeopt = device->configValue<std::string>(nullptr, "stereo-mode"))
- {
- const char *mode{modeopt->c_str()};
- if(al::strcasecmp(mode, "headphones") == 0)
- headphones = true;
- else if(al::strcasecmp(mode, "speakers") == 0)
- headphones = false;
- else if(al::strcasecmp(mode, "auto") != 0)
- ERR("Unexpected stereo-mode: %s\n", mode);
- }
- }
/* If there's no request for HRTF and the device is headphones, or if HRTF
* is explicitly requested, try to enable it.
*/
- if((!hrtfreq && headphones) || (hrtfreq && hrtfreq.value()))
+ if((!hrtfreq && device->Flags.test(DirectEar)) || hrtfreq.value_or(false))
{
if(device->mHrtfList.empty())
device->enumerateHrtfs();