From d0e5e138e279f40f92b7d41d885695a206ec36c0 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 23 Oct 2021 07:51:06 -0700 Subject: Use a flag to indicate headphone-like output --- alc/panning.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'alc/panning.cpp') 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 hrtfreq) return; } - bool headphones{device->IsHeadphones}; - if(device->Type != DeviceType::Loopback) - { - if(auto modeopt = device->configValue(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(); -- cgit v1.2.3