diff options
author | Chris Robinson <[email protected]> | 2019-02-27 23:13:40 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-02-27 23:13:40 -0800 |
commit | e4b76d26271931d1207538cbfbfb92facad0e9c7 (patch) | |
tree | 6401762a02043975aa14b2425b69124637339c26 /Alc/hrtf.h | |
parent | 86926f0998c581530177b8c54050fc9d28f561f7 (diff) |
Reverse the HRTF field array
Most often a sound's distance will be beyond the farthest field measurement, so
It's more efficient to have the farthest field first and avoid looping through
the whole field array for them.
Diffstat (limited to 'Alc/hrtf.h')
-rw-r--r-- | Alc/hrtf.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -29,10 +29,15 @@ struct HrtfEntry { ALuint sampleRate; ALsizei irSize; + /* Base elevation index for the farthest field. */ + ALsizei evFarBase; struct Field { - ALfloat distance; ALubyte evCount; + ALfloat distance; }; + /* NOTE: Fields are stored *backwards*. field[0] is the farthest field, and + * field[fdCount-1] is the nearest. + */ ALsizei fdCount; Field *field; |