From 6f59ebab279c67247def10effbea284df030ae6c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 18 Aug 2015 07:44:17 -0700 Subject: Don't explicitly store first-order coefficients It seems a simple scaling on the coefficients will allow first-order content to work with second- and third-order coefficients, although obviously not with any improved locality. That may be something to look into for the future, but this is good enough for now. --- OpenAL32/Include/alMain.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenAL32/Include') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 8dad968f..e3df6034 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -626,10 +626,7 @@ enum HrtfMode { * second-order has 9, and third-order has 16. */ #define MAX_AMBI_COEFFS 16 -typedef struct ChannelConfig { - ALfloat HOACoeff[MAX_AMBI_COEFFS]; - ALfloat FOACoeff[4]; -} ChannelConfig; +typedef ALfloat ChannelConfig[MAX_AMBI_COEFFS]; #define HRTF_HISTORY_BITS (6) @@ -722,7 +719,8 @@ struct ALCdevice_struct ALuint Flags; enum Channel ChannelName[MAX_OUTPUT_CHANNELS]; - ChannelConfig Channel[MAX_OUTPUT_CHANNELS]; + ChannelConfig AmbiCoeffs[MAX_OUTPUT_CHANNELS]; + ALfloat AmbiScale; /* Scale for first-order XYZ inputs using AmbCoeffs. */ ALuint NumChannels; ALuint64 ClockBase; -- cgit v1.2.3