From 6b4b00e4625139157996bcf2161ec8688a4b11e8 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 10 Mar 2017 10:47:43 -0800 Subject: Dynamically allocate the device's HRTF state --- OpenAL32/Include/alMain.h | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'OpenAL32/Include') 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; -- cgit v1.2.3