aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-07-17 00:46:18 -0700
committerChris Robinson <[email protected]>2016-07-17 00:46:18 -0700
commit84ca38ba957d90b6b864cd50cc313e4a7fe1386c (patch)
tree46574d3d67e8d480ae0b5141d2734dfaebe59df1 /Alc
parent35cbecabf91fe449bb7209aa98ba7461bfd078a2 (diff)
Make a MAX_AMBI2D_COEFFS macro instead of a magic number
Diffstat (limited to 'Alc')
-rw-r--r--Alc/bformatdec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/bformatdec.c b/Alc/bformatdec.c
index 49532cc5..d6cf25e2 100644
--- a/Alc/bformatdec.c
+++ b/Alc/bformatdec.c
@@ -272,7 +272,7 @@ int bformatdec_getOrder(const struct BFormatDec *dec)
void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALuint chancount, ALuint srate, const ALuint chanmap[MAX_OUTPUT_CHANNELS], int flags)
{
- static const ALuint map2DTo3D[7] = {
+ static const ALuint map2DTo3D[MAX_AMBI2D_COEFFS] = {
0, 1, 3, 4, 8, 9, 15
};
const ALfloat *coeff_scale = UnitScale;
@@ -365,7 +365,7 @@ void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALuint chancount,
if(!dec->Periphonic)
{
- for(j = 0,k = 0;j < 7;j++)
+ for(j = 0,k = 0;j < MAX_AMBI2D_COEFFS;j++)
{
ALuint l = map2DTo3D[j];
if(j == 0) gain = conf->HFOrderGain[0];
@@ -409,7 +409,7 @@ void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALuint chancount,
if(!dec->Periphonic)
{
- for(j = 0,k = 0;j < 7;j++)
+ for(j = 0,k = 0;j < MAX_AMBI2D_COEFFS;j++)
{
ALuint l = map2DTo3D[j];
if(j == 0) gain = conf->HFOrderGain[0] * ratio;
@@ -421,7 +421,7 @@ void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALuint chancount,
coeff_scale[l] * gain *
distgain[i];
}
- for(j = 0,k = 0;j < 7;j++)
+ for(j = 0,k = 0;j < MAX_AMBI2D_COEFFS;j++)
{
ALuint l = map2DTo3D[j];
if(j == 0) gain = conf->LFOrderGain[0] / ratio;