Don't use custom decoder configurations with mono or stereo
By default, stereo outputs using UHJ, which renders to a B-Format buffer that gets run through a UHJ encoder for output. It may also output using pair-wise panning, which pans between -30 and +30 degrees with the speakers at the two ends. In both cases, the stereo coefficients are ignored. Mono, having only one output channel, can realistically only attenuate its channel. Turning the volume up and down accomplishes the same result.
This commit is contained in:
parent
b4a1ba9d3f
commit
ad7ad48bd1
@ -390,6 +390,13 @@ static bool LoadChannelSetup(ALCdevice *device)
|
||||
AmbDecConf conf;
|
||||
ALuint i, j;
|
||||
|
||||
/* Don't use custom decoders with mono or stereo output (stereo is using
|
||||
* UHJ or pair-wise panning, thus ignores the custom coefficients anyway,
|
||||
* and mono would realistically only specify attenuation on the output).
|
||||
*/
|
||||
if(device->FmtChans == DevFmtMono || device->FmtChans == DevFmtStereo)
|
||||
return false;
|
||||
|
||||
layout = GetChannelLayoutName(device->FmtChans);
|
||||
if(!layout) return false;
|
||||
|
||||
@ -629,6 +636,12 @@ ALvoid aluInitPanning(ALCdevice *device)
|
||||
|
||||
ambdec_init(&conf);
|
||||
|
||||
/* Don't do HQ ambisonic decoding with mono or stereo output. Same
|
||||
* reasons as in LoadChannelSetup.
|
||||
*/
|
||||
if(device->FmtChans == DevFmtMono || device->FmtChans == DevFmtStereo)
|
||||
goto ambi_fail;
|
||||
|
||||
layout = GetChannelLayoutName(device->FmtChans);
|
||||
if(!layout) goto ambi_fail;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user