diff options
author | Chris Robinson <[email protected]> | 2015-02-10 11:22:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-02-10 11:22:28 -0800 |
commit | a6e574ba9e1a7dade95b9d4ddf864df5c0724b21 (patch) | |
tree | bd75815ca6a1ec7c8d3f6f9d47c3183b1a774ba7 /Alc/panning.c | |
parent | 3ed79cc229affe608e6f672b65a9c56659eeeccc (diff) |
Calculate HRTF coefficients for all B-Format channels at once
It's possible to calculate HRTF coefficients for full third-order ambisonics
now, but it's still not possible to use them here without upmixing first-order
content.
Diffstat (limited to 'Alc/panning.c')
-rw-r--r-- | Alc/panning.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Alc/panning.c b/Alc/panning.c index 9b1721cf..151ffe89 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -362,12 +362,18 @@ ALvoid aluInitPanning(ALCdevice *device) device->ChannelName[i] = chanmap[i].ChanName; for(;i < MAX_OUTPUT_CHANNELS;i++) device->ChannelName[i] = InvalidChannel; - SetChannelMap(device, chanmap, count); - for(i = 0;i < count;i++) + { - GetBFormatHrtfCoeffs(device->Hrtf, i, device->Hrtf_Params[i].Coeffs, - device->Hrtf_Params[i].Delay); + ALfloat (*coeffs_list[4])[2] = { + device->Hrtf_Params[0].Coeffs, device->Hrtf_Params[1].Coeffs, + device->Hrtf_Params[2].Coeffs, device->Hrtf_Params[3].Coeffs + }; + ALuint *delay_list[4] = { + device->Hrtf_Params[0].Delay, device->Hrtf_Params[1].Delay, + device->Hrtf_Params[2].Delay, device->Hrtf_Params[3].Delay + }; + GetBFormatHrtfCoeffs(device->Hrtf, 4, coeffs_list, delay_list); } return; |