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/panning.cpp | |
parent | 6761fe137fe42aa8dbb0c1a5fac13993ff93f784 (diff) |
Fix some integer truncation warnings in MSVC
Diffstat (limited to 'Alc/panning.cpp')
-rw-r--r-- | Alc/panning.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/panning.cpp b/Alc/panning.cpp index 4fbf3cc3..2b8c8143 100644 --- a/Alc/panning.cpp +++ b/Alc/panning.cpp @@ -457,7 +457,7 @@ void InitCustomPanning(ALCdevice *device, const AmbDecConf *conf, const ALsizei ALsizei count; if((conf->ChanMask&AMBI_PERIPHONIC_MASK)) { - count = AmbiChannelsFromOrder(order); + count = static_cast<ALsizei>(AmbiChannelsFromOrder(order)); std::transform(AmbiIndex::From3D.begin(), AmbiIndex::From3D.begin()+count, std::begin(device->Dry.AmbiMap), [](const ALsizei &index) noexcept { return BFChannelConfig{1.0f, index}; } @@ -465,7 +465,7 @@ void InitCustomPanning(ALCdevice *device, const AmbDecConf *conf, const ALsizei } else { - count = Ambi2DChannelsFromOrder(order); + count = static_cast<ALsizei>(Ambi2DChannelsFromOrder(order)); std::transform(AmbiIndex::From2D.begin(), AmbiIndex::From2D.begin()+count, std::begin(device->Dry.AmbiMap), [](const ALsizei &index) noexcept { return BFChannelConfig{1.0f, index}; } @@ -498,7 +498,7 @@ void InitHQPanning(ALCdevice *device, const AmbDecConf *conf, const ALsizei (&sp ALsizei count; if((conf->ChanMask&AMBI_PERIPHONIC_MASK)) { - count = AmbiChannelsFromOrder(order); + count = static_cast<ALsizei>(AmbiChannelsFromOrder(order)); std::transform(AmbiIndex::From3D.begin(), AmbiIndex::From3D.begin()+count, std::begin(device->Dry.AmbiMap), [](const ALsizei &index) noexcept { return BFChannelConfig{1.0f, index}; } @@ -506,7 +506,7 @@ void InitHQPanning(ALCdevice *device, const AmbDecConf *conf, const ALsizei (&sp } else { - count = Ambi2DChannelsFromOrder(order); + count = static_cast<ALsizei>(Ambi2DChannelsFromOrder(order)); std::transform(AmbiIndex::From2D.begin(), AmbiIndex::From2D.begin()+count, std::begin(device->Dry.AmbiMap), [](const ALsizei &index) noexcept { return BFChannelConfig{1.0f, index}; } @@ -617,12 +617,12 @@ void InitHrtfPanning(ALCdevice *device) std::begin(device->Dry.AmbiMap), [](const ALsizei &index) noexcept { return BFChannelConfig{1.0f, index}; } ); - device->Dry.NumChannels = count; + device->Dry.NumChannels = static_cast<ALsizei>(count); device->RealOut.NumChannels = device->channelsFromFmt(); BuildBFormatHrtf(device->mHrtf, device->mHrtfState.get(), device->Dry.NumChannels, AmbiPoints, - AmbiMatrix, static_cast<ALsizei>(COUNTOF(AmbiPoints)), AmbiOrderHFGain); + AmbiMatrix, COUNTOF(AmbiPoints), AmbiOrderHFGain); HrtfEntry *Hrtf{device->mHrtf}; InitNearFieldCtrl(device, Hrtf->field[0].distance, ambi_order, ChansPerOrder); |