aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alu.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-14 16:55:28 -0700
committerChris Robinson <[email protected]>2019-09-14 18:35:23 -0700
commit2c348cecb68bd3a71d388547d6b3330f9cebbfad (patch)
tree445e6387a7356da79c93db166ca8da057a0a0cfc /alc/alu.cpp
parent1c45b1791b784fb9b70e8c6ce8a1ea158e9004ff (diff)
Fix some more implicit conversions noted by GCC
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r--alc/alu.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index 0def577e..d7acf8d3 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -201,19 +201,19 @@ void ALCdevice::ProcessBs2b(const size_t SamplesToDo)
*/
void BsincPrepare(const ALuint increment, BsincState *state, const BSincTable *table)
{
- ALsizei si{BSINC_SCALE_COUNT - 1};
- ALfloat sf{0.0f};
+ size_t si{BSINC_SCALE_COUNT - 1};
+ float sf{0.0f};
if(increment > FRACTIONONE)
{
- sf = static_cast<ALfloat>FRACTIONONE / increment;
+ sf = FRACTIONONE / static_cast<float>(increment);
sf = maxf(0.0f, (BSINC_SCALE_COUNT-1) * (sf-table->scaleBase) * table->scaleRange);
- si = float2int(sf);
+ si = float2uint(sf);
/* The interpolation factor is fit to this diagonally-symmetric curve
* to reduce the transition ripple caused by interpolating different
* scales of the sinc function.
*/
- sf = 1.0f - std::cos(std::asin(sf - si));
+ sf = 1.0f - std::cos(std::asin(sf - static_cast<float>(si)));
}
state->sf = sf;