diff options
author | Chris Robinson <[email protected]> | 2019-09-12 04:17:21 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-12 04:17:21 -0700 |
commit | 6699f3cf1cd563814ec5c4513613d588a05e2941 (patch) | |
tree | dafedbf37905362a75c37df184f73843c30f6b33 /alc/effects/dedicated.cpp | |
parent | 4c76f32ddac5145231609b1cb4f28028abed814b (diff) |
Use unsigned channel indices
Diffstat (limited to 'alc/effects/dedicated.cpp')
-rw-r--r-- | alc/effects/dedicated.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp index 02fdcc78..aa81e13b 100644 --- a/alc/effects/dedicated.cpp +++ b/alc/effects/dedicated.cpp @@ -58,8 +58,9 @@ void DedicatedState::update(const ALCcontext*, const ALeffectslot *slot, const E if(slot->Params.EffectType == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT) { - const int idx{!target.RealOut ? -1 : GetChannelIdxByName(*target.RealOut, LFE)}; - if(idx != -1) + const ALuint idx{!target.RealOut ? INVALID_CHANNEL_INDEX : + GetChannelIdxByName(*target.RealOut, LFE)}; + if(idx != INVALID_CHANNEL_INDEX) { mOutTarget = target.RealOut->Buffer; mTargetGains[idx] = Gain; @@ -69,8 +70,9 @@ void DedicatedState::update(const ALCcontext*, const ALeffectslot *slot, const E { /* Dialog goes to the front-center speaker if it exists, otherwise it * plays from the front-center location. */ - const int idx{!target.RealOut ? -1 : GetChannelIdxByName(*target.RealOut, FrontCenter)}; - if(idx != -1) + const ALuint idx{!target.RealOut ? INVALID_CHANNEL_INDEX : + GetChannelIdxByName(*target.RealOut, FrontCenter)}; + if(idx != INVALID_CHANNEL_INDEX) { mOutTarget = target.RealOut->Buffer; mTargetGains[idx] = Gain; |