aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenAL32/Include/alMain.h2
-rw-r--r--examples/alffplay.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index f0771386..bea48296 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -292,7 +292,7 @@ inline int float2int(float f) noexcept
#else
- return (ALint)f;
+ return static_cast<ALint>(f);
#endif
}
diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp
index 11ff126d..0375aecc 100644
--- a/examples/alffplay.cpp
+++ b/examples/alffplay.cpp
@@ -596,9 +596,8 @@ int AudioState::decodeFrame()
mSamplesMax = mDecodedFrame->nb_samples;
}
/* Return the amount of sample frames converted */
- int data_size = swr_convert(mSwresCtx.get(), &mSamples, mDecodedFrame->nb_samples,
- (const uint8_t**)mDecodedFrame->data, mDecodedFrame->nb_samples
- );
+ int data_size{swr_convert(mSwresCtx.get(), &mSamples, mDecodedFrame->nb_samples,
+ const_cast<const uint8_t**>(mDecodedFrame->data), mDecodedFrame->nb_samples)};
av_frame_unref(mDecodedFrame.get());
return data_size;