aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/reverb.cpp
diff options
context:
space:
mode:
authorFilip Gawin <[email protected]>2019-01-08 19:42:44 +0100
committerFilip Gawin <[email protected]>2019-01-08 19:42:44 +0100
commit0d3a0635d946ab1f43fd98cec4882248bc990846 (patch)
treef9cade218fe90b815bf1b529607fadd7bfa0f656 /Alc/effects/reverb.cpp
parent2a7f27ca58f9897be06fe815a46ea76a01734a0b (diff)
Avoid using old style casts
To think about: examples/alffplay.cpp:600 OpenAL32/Include/alMain.h:295
Diffstat (limited to 'Alc/effects/reverb.cpp')
-rw-r--r--Alc/effects/reverb.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp
index 6f1b1bb1..a63cc4c3 100644
--- a/Alc/effects/reverb.cpp
+++ b/Alc/effects/reverb.cpp
@@ -359,7 +359,7 @@ inline ALvoid RealizeLineOffset(ALfloat *sampleBuffer, DelayLineI *Delay)
ALfloat *f;
ALfloat (*f4)[NUM_LINES];
} u;
- u.f = &sampleBuffer[(ptrdiff_t)Delay->Line * NUM_LINES];
+ u.f = &sampleBuffer[reinterpret_cast<ptrdiff_t>(Delay->Line) * NUM_LINES];
Delay->Line = u.f4;
}
@@ -377,7 +377,7 @@ ALuint CalcLineLength(const ALfloat length, const ptrdiff_t offset, const ALuint
/* All lines share a single sample buffer. */
Delay->Mask = samples - 1;
- Delay->Line = (ALfloat(*)[NUM_LINES])offset;
+ Delay->Line = reinterpret_cast<ALfloat(*)[NUM_LINES]>(offset);
/* Return the sample count for accumulation. */
return samples;
@@ -658,7 +658,7 @@ ALvoid UpdateLateLines(const ALfloat density, const ALfloat diffusion, const ALf
/* Scaling factor to convert the normalized reference frequencies from
* representing 0...freq to 0...max_reference.
*/
- const ALfloat norm_weight_factor = (ALfloat)frequency / AL_EAXREVERB_MAX_HFREFERENCE;
+ const ALfloat norm_weight_factor = static_cast<ALfloat>(frequency) / AL_EAXREVERB_MAX_HFREFERENCE;
/* To compensate for changes in modal density and decay time of the late
* reverb signal, the input is attenuated based on the maximal energy of