From 1dcb04157c158fc22390dd99a89469a523dd0109 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 26 Mar 2016 17:52:42 -0700 Subject: Add a config option for distance compensation --- Alc/bformatdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alc/bformatdec.c') diff --git a/Alc/bformatdec.c b/Alc/bformatdec.c index 7c202228..463a1969 100644 --- a/Alc/bformatdec.c +++ b/Alc/bformatdec.c @@ -233,7 +233,7 @@ int bformatdec_getOrder(const struct BFormatDec *dec) return 0; } -void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALuint chancount, ALuint srate, const ALuint chanmap[MAX_OUTPUT_CHANNELS]) +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] = { 0, 1, 3, 4, 8, 9, 15 @@ -362,7 +362,7 @@ void bformatdec_reset(BFormatDec *dec, const AmbDecConf *conf, ALuint chancount, maxdist = maxf(maxdist, conf->Speakers[i].Distance); memset(dec->Delay, 0, sizeof(dec->Delay)); - if(maxdist > 0.0f) + if((flags&BFDF_DistanceComp) && maxdist > 0.0f) { for(i = 0;i < conf->NumSpeakers;i++) { -- cgit v1.2.3