aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-03-10 10:47:43 -0800
committerChris Robinson <[email protected]>2017-03-10 10:47:43 -0800
commit6b4b00e4625139157996bcf2161ec8688a4b11e8 (patch)
tree5fd64318d724e6d57fb1063519b65ce394d851b6 /OpenAL32/Include
parent51cb969446baad21d688a26e01b01c383c63c660 (diff)
Dynamically allocate the device's HRTF state
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index e4c5b94a..b2e1bfcf 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -622,6 +622,14 @@ typedef struct HrtfParams {
ALsizei Delay[2];
} HrtfParams;
+typedef struct DirectHrtfState {
+ /* HRTF filter state for dry buffer content */
+ alignas(16) ALfloat Values[9][HRIR_LENGTH][2];
+ alignas(16) ALfloat Coeffs[9][HRIR_LENGTH][2];
+ ALsizei Offset;
+ ALsizei IrSize;
+} DirectHrtfState;
+
typedef struct HrtfEntry {
al_string name;
@@ -687,19 +695,12 @@ struct ALCdevice_struct
// Map of Filters for this device
UIntMap FilterMap;
- /* HRTF filter tables */
- struct {
- vector_HrtfEntry List;
- al_string Name;
- ALCenum Status;
- const struct Hrtf *Handle;
-
- /* HRTF filter state for dry buffer content */
- alignas(16) ALfloat Values[9][HRIR_LENGTH][2];
- alignas(16) ALfloat Coeffs[9][HRIR_LENGTH][2];
- ALsizei Offset;
- ALsizei IrSize;
- } Hrtf;
+ /* HRTF state and info */
+ DirectHrtfState *Hrtf;
+ al_string HrtfName;
+ const struct Hrtf *HrtfHandle;
+ vector_HrtfEntry HrtfList;
+ ALCenum HrtfStatus;
/* UHJ encoder state */
struct Uhj2Encoder *Uhj_Encoder;