diff options
author | Chris Robinson <[email protected]> | 2019-04-12 19:19:24 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-04-12 19:19:24 -0700 |
commit | 629cfa04a3248bacc9923b879a9c8f0dbe965951 (patch) | |
tree | 0277e050a35641921b19cff3ad9e8089740e4e4e /Alc/hrtf.cpp | |
parent | 6761fe137fe42aa8dbb0c1a5fac13993ff93f784 (diff) |
Fix some integer truncation warnings in MSVC
Diffstat (limited to 'Alc/hrtf.cpp')
-rw-r--r-- | Alc/hrtf.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/hrtf.cpp b/Alc/hrtf.cpp index dc15f9e9..9fa79e22 100644 --- a/Alc/hrtf.cpp +++ b/Alc/hrtf.cpp @@ -292,7 +292,7 @@ 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 ALsizei AmbiCount, const ALfloat *RESTRICT AmbiOrderHFGain) +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) { static constexpr int OrderFromChan[MAX_AMBI_CHANNELS]{ 0, 1,1,1, 2,2,2,2,2, 3,3,3,3,3,3,3, @@ -346,7 +346,7 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz auto tmpres = al::vector<HrirArray<ALdouble>>(NumChannels); auto tmpfilt = al::vector<std::array<ALdouble,HRIR_LENGTH*4>>(3); - for(ALsizei c{0};c < AmbiCount;++c) + for(size_t c{0u};c < AmbiCount;++c) { const ALfloat (*fir)[2]{&Hrtf->coeffs[idx[c] * Hrtf->irSize]}; const ALsizei ldelay{Hrtf->delays[idx[c]][0] - min_delay + base_delay}; @@ -386,7 +386,7 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz * phase-shift (+n degrees becomes -n degrees). */ allpass.clear(); - allpass.process(tmpfilt[2].data(), tmpfilt[2].size()); + allpass.process(tmpfilt[2].data(), static_cast<int>(tmpfilt[2].size())); std::reverse(tmpfilt[2].begin(), tmpfilt[2].end()); /* Now apply the band-splitter. This applies the normal phase-shift, @@ -395,7 +395,7 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz */ splitter.clear(); splitter.process(tmpfilt[0].data(), tmpfilt[1].data(), tmpfilt[2].data(), - tmpfilt[2].size()); + static_cast<int>(tmpfilt[2].size())); /* Apply left ear response with delay and HF scale. */ for(ALsizei i{0};i < NumChannels;++i) @@ -413,12 +413,12 @@ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsiz [](const ALfloat (&ir)[2]) noexcept -> ALdouble { return ir[1]; }); allpass.clear(); - allpass.process(tmpfilt[2].data(), tmpfilt[2].size()); + allpass.process(tmpfilt[2].data(), static_cast<int>(tmpfilt[2].size())); std::reverse(tmpfilt[2].begin(), tmpfilt[2].end()); splitter.clear(); splitter.process(tmpfilt[0].data(), tmpfilt[1].data(), tmpfilt[2].data(), - tmpfilt[2].size()); + static_cast<int>(tmpfilt[2].size())); for(ALsizei i{0};i < NumChannels;++i) { |