diff options
author | Chris Robinson <[email protected]> | 2019-09-14 08:50:07 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-14 08:50:07 -0700 |
commit | 3675dfcfef3becf8cfe84b0b213d502a2cf0088a (patch) | |
tree | b947eeec70836c2fb0cb584f333e6b524172fe3f | |
parent | 88364dcbc75ba73d68a3069e09b9cb17d15bd06b (diff) |
Use an unsigned index value
-rw-r--r-- | alc/alcmain.h | 2 | ||||
-rw-r--r-- | alc/panning.cpp | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/alc/alcmain.h b/alc/alcmain.h index 933ee779..9182d5d4 100644 --- a/alc/alcmain.h +++ b/alc/alcmain.h @@ -142,7 +142,7 @@ public: struct BFChannelConfig { ALfloat Scale; - ALsizei Index; + ALuint Index; }; /* Size for temporary storage of buffer data, in ALfloats. Larger values need diff --git a/alc/panning.cpp b/alc/panning.cpp index 018296d3..7fb1d9ff 100644 --- a/alc/panning.cpp +++ b/alc/panning.cpp @@ -969,10 +969,7 @@ void ComputePanGains(const MixParams *mix, const ALfloat *RESTRICT coeffs, ALflo auto iter = std::transform(ambimap, ambimap+mix->Buffer.size(), std::begin(gains), [coeffs,ingain](const BFChannelConfig &chanmap) noexcept -> ALfloat - { - ASSUME(chanmap.Index >= 0); - return chanmap.Scale * coeffs[chanmap.Index] * ingain; - } + { return chanmap.Scale * coeffs[chanmap.Index] * ingain; } ); std::fill(iter, std::end(gains), 0.0f); } |