diff options
author | Chris Robinson <[email protected]> | 2016-04-19 13:58:33 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-04-19 13:58:33 -0700 |
commit | a59332f6221cbb0b0aedae90ff9b2becf464f543 (patch) | |
tree | 9d6230524315c51eae1812b4396fd16ad637a0fc /Alc/panning.c | |
parent | cd2e9114e8bdf6f45f47b72c0bb422b59bf24bf5 (diff) |
Combine two if checks into one
Diffstat (limited to 'Alc/panning.c')
-rw-r--r-- | Alc/panning.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Alc/panning.c b/Alc/panning.c index 5803a4e0..ed10c321 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -607,17 +607,13 @@ static void InitHQPanning(ALCdevice *device, const AmbDecConf *conf, const ALuin size_t count; ALuint i; - if((conf->ChanMask & ~0x831b)) - count = (conf->ChanMask > 0xf) ? (conf->ChanMask > 0x1ff) ? 16: 9 : 4; - else - count = (conf->ChanMask > 0xf) ? (conf->ChanMask > 0x1ff) ? 7 : 5 : 3; - devname = al_string_get_cstr(device->DeviceName); if(GetConfigValueBool(devname, "decoder", "distance-comp", 1)) decflags |= BFDF_DistanceComp; if((conf->ChanMask & ~0x831b)) { + count = (conf->ChanMask > 0xf) ? 9 : 4; for(i = 0;i < count;i++) { device->Dry.Ambi.Map[i].Scale = 1.0f; @@ -627,6 +623,8 @@ static void InitHQPanning(ALCdevice *device, const AmbDecConf *conf, const ALuin else { static int map[MAX_AMBI_COEFFS] = { 0, 1, 3, 4, 8, 9, 15 }; + + count = (conf->ChanMask > 0xf) ? (conf->ChanMask > 0x1ff) ? 7 : 5 : 3; for(i = 0;i < count;i++) { device->Dry.Ambi.Map[i].Scale = 1.0f; |