aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/hrtf.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-02-27 23:13:40 -0800
committerChris Robinson <[email protected]>2019-02-27 23:13:40 -0800
commite4b76d26271931d1207538cbfbfb92facad0e9c7 (patch)
tree6401762a02043975aa14b2425b69124637339c26 /Alc/hrtf.h
parent86926f0998c581530177b8c54050fc9d28f561f7 (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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Alc/hrtf.h b/Alc/hrtf.h
index c87210d4..9a6dc61e 100644
--- a/Alc/hrtf.h
+++ b/Alc/hrtf.h
@@ -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;