aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/bformatdec.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-02-28 19:44:34 -0800
committerChris Robinson <[email protected]>2017-02-28 19:48:44 -0800
commit6f2a30dea208f7b6fea2062bf05ebdd45562ee24 (patch)
tree27ea7682f4a27e185827a2a5bc6a783ab7eade0b /Alc/bformatdec.c
parentd3365f1b5b538dd261d9114fb31877b8dba5285d (diff)
Remove an unneeded function
Diffstat (limited to 'Alc/bformatdec.c')
-rw-r--r--Alc/bformatdec.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/Alc/bformatdec.c b/Alc/bformatdec.c
index a0aa4e44..92a2aecf 100644
--- a/Alc/bformatdec.c
+++ b/Alc/bformatdec.c
@@ -6,6 +6,7 @@
#include "mixer_defs.h"
#include "alu.h"
+#include "bool.h"
#include "threads.h"
#include "almalloc.h"
@@ -181,7 +182,6 @@ typedef struct BFormatDec {
ALsizei NumChannels;
ALboolean DualBand;
- ALboolean Periphonic;
} BFormatDec;
BFormatDec *bformatdec_alloc()
@@ -204,29 +204,13 @@ void bformatdec_free(BFormatDec *dec)
}
}
-int bformatdec_getOrder(const struct BFormatDec *dec)
-{
- if(dec->Periphonic)
- {
- if(dec->NumChannels > 9) return 3;
- if(dec->NumChannels > 4) return 2;
- if(dec->NumChannels > 1) return 1;
- }
- else
- {
- if(dec->NumChannels > 5) return 3;
- if(dec->NumChannels > 3) return 2;
- if(dec->NumChannels > 1) return 1;
- }
- return 0;
-}
-
void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALsizei chancount, ALuint srate, const ALsizei chanmap[MAX_OUTPUT_CHANNELS])
{
static const ALsizei map2DTo3D[MAX_AMBI2D_COEFFS] = {
0, 1, 3, 4, 8, 9, 15
};
const ALfloat *coeff_scale = UnitScale;
+ bool periphonic;
ALfloat ratio;
ALsizei i;
@@ -256,7 +240,7 @@ void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALsizei chancount
bandsplit_init(&dec->UpSampler[i].XOver, ratio);
if((conf->ChanMask&AMBI_PERIPHONIC_MASK))
{
- dec->Periphonic = AL_TRUE;
+ periphonic = true;
dec->UpSampler[0].Gains[FB_HighFreq] = (dec->NumChannels > 9) ? W_SCALE3D_THIRD :
(dec->NumChannels > 4) ? W_SCALE3D_SECOND : 1.0f;
@@ -270,7 +254,7 @@ void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALsizei chancount
}
else
{
- dec->Periphonic = AL_FALSE;
+ periphonic = false;
dec->UpSampler[0].Gains[FB_HighFreq] = (dec->NumChannels > 5) ? W_SCALE2D_THIRD :
(dec->NumChannels > 3) ? W_SCALE2D_SECOND : 1.0f;
@@ -295,7 +279,7 @@ void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALsizei chancount
ALfloat gain;
ALsizei j, k;
- if(!dec->Periphonic)
+ if(!periphonic)
{
for(j = 0,k = 0;j < MAX_AMBI2D_COEFFS;j++)
{
@@ -339,7 +323,7 @@ void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALsizei chancount
ALfloat gain;
ALsizei j, k;
- if(!dec->Periphonic)
+ if(!periphonic)
{
for(j = 0,k = 0;j < MAX_AMBI2D_COEFFS;j++)
{