diff options
author | Chris Robinson <[email protected]> | 2017-02-19 17:45:27 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-02-19 17:45:27 -0800 |
commit | 9da152a9c8b9f3a6f019c77e0324772344fc9156 (patch) | |
tree | 878dc17af78130a4629e97745daa84e36756ae39 /Alc/panning.c | |
parent | d45dd9c668b2f4331492600d8ff99dc20c068664 (diff) |
Don't use periphonic FOA when the HOA decoder is not periphonic
Diffstat (limited to 'Alc/panning.c')
-rw-r--r-- | Alc/panning.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Alc/panning.c b/Alc/panning.c index 98da032e..eb2ec0c8 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -742,10 +742,20 @@ static void InitHQPanning(ALCdevice *device, const AmbDecConf *conf, const ALsiz else { memset(&device->FOAOut.Ambi, 0, sizeof(device->FOAOut.Ambi)); - for(i = 0;i < 4;i++) + if((conf->ChanMask&AMBI_PERIPHONIC_MASK)) + for(i = 0;i < 4;i++) + { + device->FOAOut.Ambi.Map[i].Scale = 1.0f; + device->FOAOut.Ambi.Map[i].Index = i; + } + else { - device->FOAOut.Ambi.Map[i].Scale = 1.0f; - device->FOAOut.Ambi.Map[i].Index = i; + static const int map[3] = { 0, 1, 3 }; + for(i = 0;i < 3;i++) + { + device->FOAOut.Ambi.Map[i].Scale = 1.0f; + device->FOAOut.Ambi.Map[i].Index = map[i]; + } } device->FOAOut.CoeffCount = 0; } |