diff options
author | Chris Robinson <[email protected]> | 2016-08-11 23:20:35 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-08-11 23:20:35 -0700 |
commit | c6c6e3324dd9d5d864b6146ca7a6c6e6369978a6 (patch) | |
tree | 15e7062717c5c81be597779698444abb833c84b2 /OpenAL32/Include/alMain.h | |
parent | 9a60184bf63640f0b12b9e4a894b98e83212d229 (diff) |
Decode directly from B-Format to HRTF instead of a cube
Last time this attempted to average the HRIRs according to their contribution
to a given B-Format channel as if they were loudspeakers, as well as averaging
the HRIR delays. The latter part resulted in the loss of the ITD (inter-aural
time delay), a key component of HRTF.
This time, the HRIRs are averaged similar to above, except instead of averaging
the delays, they're applied to the resulting coefficients (for example, a delay
of 8 would apply the HRIR starting at the 8th sample of the target HRIR). This
does roughly double the IR length, as the largest delay is about 35 samples
while the filter is normally 32 samples. However, this is still smaller the
original data set IR (which was 256 samples), it also only needs to be applied
to 4 channels for first-order ambisonics, rather than the 8-channel cube. So
it's doing twice as much work per sample, but only working on half the number
of samples.
Additionally, since the resulting HRIRs no longer rely on an extra delay line,
a more efficient HRTF mixing function can be made that doesn't use one. Such a
function can also avoid the per-sample stepping parameters the original uses.
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r-- | OpenAL32/Include/alMain.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 3b6113ef..3d099ca2 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -599,9 +599,10 @@ struct ALCdevice_struct ALCenum Hrtf_Status; /* HRTF filter state for dry buffer content */ - HrtfState Hrtf_State[8]; - HrtfParams Hrtf_Params[8]; + HrtfState Hrtf_State[4]; + HrtfParams Hrtf_Params[4]; ALuint Hrtf_Offset; + ALuint Hrtf_IrSize; /* UHJ encoder state */ struct Uhj2Encoder *Uhj_Encoder; |