Use an unsigned index value

This commit is contained in:
Chris Robinson
2019-09-14 08:50:07 -07:00
parent 88364dcbc7
commit 3675dfcfef
2 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -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
+1 -4
View File
@@ -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);
}