aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/pshifter.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-14 10:59:02 -0700
committerChris Robinson <[email protected]>2019-09-14 12:16:51 -0700
commitfa64b1fd6d48165d1e028d1ec96174c3b7fc6341 (patch)
treed1b02d4aa32a742514d0b3610b70decc407de21b /alc/effects/pshifter.cpp
parent3675dfcfef3becf8cfe84b0b213d502a2cf0088a (diff)
Fix implicit conversions in the effects
Diffstat (limited to 'alc/effects/pshifter.cpp')
-rw-r--r--alc/effects/pshifter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp
index 9d011b12..a4d66706 100644
--- a/alc/effects/pshifter.cpp
+++ b/alc/effects/pshifter.cpp
@@ -55,9 +55,9 @@ std::array<ALdouble,STFT_SIZE> InitHannWindow()
{
std::array<ALdouble,STFT_SIZE> ret;
/* Create lookup table of the Hann window for the desired size, i.e. HIL_SIZE */
- for(ALsizei i{0};i < STFT_SIZE>>1;i++)
+ for(size_t i{0};i < STFT_SIZE>>1;i++)
{
- ALdouble val = std::sin(al::MathDefs<double>::Pi() * i / ALdouble{STFT_SIZE-1});
+ const double val{std::sin(al::MathDefs<double>::Pi() * i / ALdouble{STFT_SIZE-1})};
ret[i] = ret[STFT_SIZE-1-i] = val * val;
}
return ret;
@@ -93,7 +93,7 @@ inline complex_d polar2rect(const ALphasor &number)
struct PshifterState final : public EffectState {
/* Effect parameters */
size_t mCount;
- ALsizei mPitchShiftI;
+ ALuint mPitchShiftI;
ALfloat mPitchShift;
ALfloat mFreqPerBin;
@@ -151,7 +151,7 @@ void PshifterState::update(const ALCcontext*, const ALeffectslot *slot, const Ef
const float pitch{std::pow(2.0f,
static_cast<ALfloat>(props->Pshifter.CoarseTune*100 + props->Pshifter.FineTune) / 1200.0f
)};
- mPitchShiftI = fastf2i(pitch*FRACTIONONE);
+ mPitchShiftI = fastf2u(pitch*FRACTIONONE);
mPitchShift = mPitchShiftI * (1.0f/FRACTIONONE);
ALfloat coeffs[MAX_AMBI_CHANNELS];