From 0d3a0635d946ab1f43fd98cec4882248bc990846 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Tue, 8 Jan 2019 19:42:44 +0100 Subject: Avoid using old style casts To think about: examples/alffplay.cpp:600 OpenAL32/Include/alMain.h:295 --- Alc/effects/fshifter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alc/effects/fshifter.cpp') diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp index c444872c..994dd90c 100644 --- a/Alc/effects/fshifter.cpp +++ b/Alc/effects/fshifter.cpp @@ -111,7 +111,7 @@ void ALfshifterState::update(const ALCcontext *context, const ALeffectslot *slot { const ALCdevice *device{context->Device}; - ALfloat step{props->Fshifter.Frequency / (ALfloat)device->Frequency}; + ALfloat step{props->Fshifter.Frequency / static_cast(device->Frequency)}; mPhaseStep = fastf2i(minf(step, 0.5f) * FRACTIONONE); switch(props->Fshifter.LeftDirection) @@ -190,7 +190,7 @@ void ALfshifterState::process(ALsizei SamplesToDo, const ALfloat (*RESTRICT Samp for(k = 0;k < SamplesToDo;k++) { double phase = mPhase * ((1.0/FRACTIONONE) * al::MathDefs::Tau()); - BufferOut[k] = (float)(mOutdata[k].real()*std::cos(phase) + + BufferOut[k] = static_cast(mOutdata[k].real()*std::cos(phase) + mOutdata[k].imag()*std::sin(phase)*mLdSign); mPhase += mPhaseStep; -- cgit v1.2.3