diff options
author | Chris Robinson <[email protected]> | 2018-03-26 06:04:11 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-03-26 06:04:11 -0700 |
commit | 964723691ac45943b6d9b62268ec7908cf27b6a6 (patch) | |
tree | e719cb6679f2ed24e3784f56cf10c57cb43c60bf | |
parent | 2475d4652c3bd7782ce9a8016ea43dde80bf97f4 (diff) |
Condense an if check
-rw-r--r-- | Alc/ALu.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -768,9 +768,8 @@ static void CalcPanningAndFilters(ALvoice *voice, const ALfloat Distance, const for(c = 0;c < num_channels;c++) { - int idx; - if((idx=GetChannelIdxByName(&Device->RealOut, chans[c].channel)) != -1) - voice->Direct.Params[c].Gains.Target[idx] = DryGain; + int idx = GetChannelIdxByName(&Device->RealOut, chans[c].channel); + if(idx != -1) voice->Direct.Params[c].Gains.Target[idx] = DryGain; } /* Auxiliary sends still use normal channel panning since they mix to |