diff options
author | Chris Robinson <[email protected]> | 2016-04-15 17:31:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-04-15 17:31:04 -0700 |
commit | bd65f64d0506be6f20d69311c9a6ade3d0a8d01d (patch) | |
tree | 7c4fb19c07978556b815dc666f4b90bde4003522 /OpenAL32/Include | |
parent | e27fad90dec951f75b40004dcd32470ca404921d (diff) |
Avoid mixing all coefficients together when only some are used
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alMain.h | 4 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 9ba6d050..52296a15 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -511,6 +511,10 @@ struct ALCdevice_struct enum Channel ChannelName[MAX_OUTPUT_CHANNELS]; /* Ambisonic coefficients for mixing to the dry buffer. */ ChannelConfig AmbiCoeffs[MAX_OUTPUT_CHANNELS]; + /* Number of coefficients in each ChannelConfig to mix together (4 for + * first-order, 9 for second-order, etc). + */ + ALuint CoeffCount; /* Dry buffer will be aliased by the virtual or real output. */ ALfloat (*Buffer)[BUFFERSIZE]; diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 2869722b..8a0aa81e 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -337,7 +337,7 @@ void ComputeAmbientGains(const ChannelConfig *chancoeffs, ALuint numchans, ALflo * Computes panning gains using the given channel decoder coefficients and the * pre-calculated direction or angle coefficients. */ -void ComputePanningGains(const ChannelConfig *chancoeffs, ALuint numchans, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); +void ComputePanningGains(const ChannelConfig *chancoeffs, ALuint numchans, ALuint numcoeffs, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); void ComputePanningGainsBF(const BFChannelConfig *chanmap, ALuint numchans, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); /** |