aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-08-18 07:44:17 -0700
committerChris Robinson <[email protected]>2015-08-18 07:44:17 -0700
commit6f59ebab279c67247def10effbea284df030ae6c (patch)
tree0a6537d28134d252e08444aa795ea9fd4fb13083 /OpenAL32
parent53f6590b17fba8f9de7bdc1a349e9787217d9c85 (diff)
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.
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h8
1 files changed, 3 insertions, 5 deletions
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;