aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/pulseaudio.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/backends/pulseaudio.cpp
parent2a7f27ca58f9897be06fe815a46ea76a01734a0b (diff)
Avoid using old style casts
To think about: examples/alffplay.cpp:600 OpenAL32/Include/alMain.h:295
Diffstat (limited to 'Alc/backends/pulseaudio.cpp')
-rw-r--r--Alc/backends/pulseaudio.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp
index 34c5fbfe..b717d67a 100644
--- a/Alc/backends/pulseaudio.cpp
+++ b/Alc/backends/pulseaudio.cpp
@@ -1131,7 +1131,7 @@ ALCboolean PulsePlayback::reset()
/* Server updated our playback rate, so modify the buffer attribs
* accordingly. */
mDevice->NumUpdates = static_cast<ALuint>(clampd(
- (ALdouble)mSpec.rate/mDevice->Frequency*mDevice->NumUpdates + 0.5, 2.0, 16.0));
+ static_cast<ALdouble>(mSpec.rate)/mDevice->Frequency*mDevice->NumUpdates + 0.5, 2.0, 16.0));
period_size = mDevice->UpdateSize * mFrameSize;
mAttr.maxlength = -1;
@@ -1511,10 +1511,10 @@ ALCenum PulseCapture::captureSamples(ALCvoid *buffer, ALCuint samples)
memcpy(buffer, mCapStore, rem);
- buffer = (ALbyte*)buffer + rem;
+ buffer = static_cast<ALbyte*>(buffer) + rem;
todo -= rem;
- mCapStore = (ALbyte*)mCapStore + rem;
+ mCapStore = reinterpret_cast<const ALbyte*>(mCapStore) + rem;
mCapRemain -= rem;
if(mCapRemain == 0)
{