aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/mixer')
-rw-r--r--Alc/mixer/mixer_c.cpp4
-rw-r--r--Alc/mixer/mixer_sse.cpp18
2 files changed, 11 insertions, 11 deletions
diff --git a/Alc/mixer/mixer_c.cpp b/Alc/mixer/mixer_c.cpp
index 31a5cee4..1b16b733 100644
--- a/Alc/mixer/mixer_c.cpp
+++ b/Alc/mixer/mixer_c.cpp
@@ -46,7 +46,7 @@ const ALfloat *Resample_copy_C(const InterpState* UNUSED(state),
ASSUME(numsamples > 0);
#if defined(HAVE_SSE) || defined(HAVE_NEON)
/* Avoid copying the source data if it's aligned like the destination. */
- if((((intptr_t)src)&15) == (((intptr_t)dst)&15))
+ if((reinterpret_cast<intptr_t>(src)&15) == (reinterpret_cast<intptr_t>(dst)&15))
return src;
#endif
std::copy_n(src, numsamples, dst);
@@ -137,7 +137,7 @@ void Mix_C(const ALfloat *data, ALsizei OutChans, ALfloat (*RESTRICT OutBuffer)[
ASSUME(OutChans > 0);
ASSUME(BufferSize > 0);
- const ALfloat delta{(Counter > 0) ? 1.0f/(ALfloat)Counter : 0.0f};
+ const ALfloat delta{(Counter > 0) ? 1.0f / static_cast<ALfloat>(Counter) : 0.0f};
for(ALsizei c{0};c < OutChans;c++)
{
ALsizei pos{0};
diff --git a/Alc/mixer/mixer_sse.cpp b/Alc/mixer/mixer_sse.cpp
index df5270e7..9eadfd9e 100644
--- a/Alc/mixer/mixer_sse.cpp
+++ b/Alc/mixer/mixer_sse.cpp
@@ -37,10 +37,10 @@ const ALfloat *Resample_bsinc_SSE(const InterpState *state, const ALfloat *RESTR
#undef FRAC_PHASE_BITDIFF
ALsizei offset{m*pi*4};
- const __m128 *fil{(const __m128*)(filter + offset)}; offset += m;
- const __m128 *scd{(const __m128*)(filter + offset)}; offset += m;
- const __m128 *phd{(const __m128*)(filter + offset)}; offset += m;
- const __m128 *spd{(const __m128*)(filter + offset)};
+ const __m128 *fil{reinterpret_cast<const __m128*>(filter + offset)}; offset += m;
+ const __m128 *scd{reinterpret_cast<const __m128*>(filter + offset)}; offset += m;
+ const __m128 *phd{reinterpret_cast<const __m128*>(filter + offset)}; offset += m;
+ const __m128 *spd{reinterpret_cast<const __m128*>(filter + offset)};
// Apply the scale and phase interpolated filter.
__m128 r4{_mm_setzero_ps()};
@@ -92,10 +92,10 @@ static inline void ApplyCoeffs(ALsizei Offset, ALfloat (&Values)[HRIR_LENGTH][2]
__m128 imp0, imp1;
__m128 coeffs{_mm_load_ps(&Coeffs[0][0])};
- __m128 vals{_mm_loadl_pi(_mm_setzero_ps(), (__m64*)&Values[Offset][0])};
+ __m128 vals{_mm_loadl_pi(_mm_setzero_ps(), reinterpret_cast<__m64*>(&Values[Offset][0]))};
imp0 = _mm_mul_ps(lrlr, coeffs);
vals = _mm_add_ps(imp0, vals);
- _mm_storel_pi((__m64*)&Values[Offset][0], vals);
+ _mm_storel_pi(reinterpret_cast<__m64*>(&Values[Offset][0]), vals);
++Offset;
for(ALsizei i{1};;)
{
@@ -115,10 +115,10 @@ static inline void ApplyCoeffs(ALsizei Offset, ALfloat (&Values)[HRIR_LENGTH][2]
break;
count = IrSize-1;
}
- vals = _mm_loadl_pi(vals, (__m64*)&Values[Offset][0]);
+ vals = _mm_loadl_pi(vals, reinterpret_cast<__m64*>(&Values[Offset][0]));
imp0 = _mm_movehl_ps(imp0, imp0);
vals = _mm_add_ps(imp0, vals);
- _mm_storel_pi((__m64*)&Values[Offset][0], vals);
+ _mm_storel_pi(reinterpret_cast<__m64*>(&Values[Offset][0]), vals);
}
else
{
@@ -156,7 +156,7 @@ void Mix_SSE(const ALfloat *data, ALsizei OutChans, ALfloat (*RESTRICT OutBuffer
ASSUME(OutChans > 0);
ASSUME(BufferSize > 0);
- const ALfloat delta{(Counter > 0) ? 1.0f/(ALfloat)Counter : 0.0f};
+ const ALfloat delta{(Counter > 0) ? 1.0f / static_cast<ALfloat>(Counter) : 0.0f};
for(ALsizei c{0};c < OutChans;c++)
{
ALsizei pos{0};