aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/hrtf.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-05 19:26:54 -0700
committerChris Robinson <[email protected]>2019-06-05 19:26:54 -0700
commit1ce310c6d1719c6f71664385e136b5510602ac21 (patch)
treece414b44426487a02953d88b7f4804d8c5ed376a /Alc/hrtf.cpp
parent410a5ca62129f03ba7cfc091fa63fc451cdfc24f (diff)
Make some more channel counts unsigned
Diffstat (limited to 'Alc/hrtf.cpp')
-rw-r--r--Alc/hrtf.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Alc/hrtf.cpp b/Alc/hrtf.cpp
index 438997ad..668e5b24 100644
--- a/Alc/hrtf.cpp
+++ b/Alc/hrtf.cpp
@@ -291,7 +291,9 @@ std::unique_ptr<DirectHrtfState> DirectHrtfState::Create(size_t num_chans)
return std::unique_ptr<DirectHrtfState>{new (ptr) DirectHrtfState{num_chans}};
}
-void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsizei NumChannels, const AngularPoint *AmbiPoints, const ALfloat (*RESTRICT AmbiMatrix)[MAX_AMBI_CHANNELS], const size_t AmbiCount, const ALfloat *RESTRICT AmbiOrderHFGain)
+void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALuint NumChannels,
+ const AngularPoint *AmbiPoints, const ALfloat (*RESTRICT AmbiMatrix)[MAX_AMBI_CHANNELS],
+ const size_t AmbiCount, const ALfloat *RESTRICT AmbiOrderHFGain)
{
static constexpr int OrderFromChan[MAX_AMBI_CHANNELS]{
0, 1,1,1, 2,2,2,2,2, 3,3,3,3,3,3,3,
@@ -350,7 +352,7 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz
if(!DualBand)
{
/* For single-band decoding, apply the HF scale to the response. */
- for(ALsizei i{0};i < NumChannels;++i)
+ for(ALuint i{0u};i < NumChannels;++i)
{
const ALdouble mult{ALdouble{AmbiOrderHFGain[OrderFromChan[i]]} *
AmbiMatrix[c][i]};
@@ -392,7 +394,7 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz
static_cast<int>(tmpfilt[2].size()));
/* Apply left ear response with delay and HF scale. */
- for(ALsizei i{0};i < NumChannels;++i)
+ for(ALuint i{0u};i < NumChannels;++i)
{
const ALdouble mult{AmbiMatrix[c][i]};
const ALdouble hfgain{AmbiOrderHFGain[OrderFromChan[i]]};
@@ -413,7 +415,7 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz
splitter.process(tmpfilt[0].data(), tmpfilt[1].data(), tmpfilt[2].data(),
static_cast<int>(tmpfilt[2].size()));
- for(ALsizei i{0};i < NumChannels;++i)
+ for(ALuint i{0u};i < NumChannels;++i)
{
const ALdouble mult{AmbiMatrix[c][i]};
const ALdouble hfgain{AmbiOrderHFGain[OrderFromChan[i]]};
@@ -425,7 +427,7 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz
tmpfilt.clear();
idx.clear();
- for(ALsizei i{0};i < NumChannels;++i)
+ for(ALuint i{0u};i < NumChannels;++i)
{
auto copy_arr = [](const std::array<double,2> &in) noexcept -> std::array<float,2>
{ return std::array<float,2>{{static_cast<float>(in[0]), static_cast<float>(in[1])}}; };