diff options
Diffstat (limited to 'alc')
-rw-r--r-- | alc/alc.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index cf510ab4..cfc58cbc 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -1903,7 +1903,15 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) else if(*optchans == DevFmtStereo) { if(opthrtf) - stereomode = *opthrtf ? StereoEncoding::Hrtf : StereoEncoding::Default; + { + if(*opthrtf) + stereomode = StereoEncoding::Hrtf; + else + { + if(stereomode.value_or(StereoEncoding::Hrtf) == StereoEncoding::Hrtf) + stereomode = StereoEncoding::Default; + } + } if(outmode == ALC_STEREO_BASIC_SOFT) stereomode = StereoEncoding::Basic; @@ -1917,6 +1925,17 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) } else { + if(opthrtf) + { + if(*opthrtf) + stereomode = StereoEncoding::Hrtf; + else + { + if(stereomode.value_or(StereoEncoding::Hrtf) == StereoEncoding::Hrtf) + stereomode = StereoEncoding::Default; + } + } + if(outmode != ALC_ANY_SOFT) { using OutputMode = ALCdevice::OutputMode; |