mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-01 16:05:07 +01:00
cubeb_sink: Use static_cast instead of reinterpret_cast in DataCallback() (#5573)
Conversions from void* to the proper data type are well-defined and supported by static_cast. We don't need to use reinterpret_cast here. Co-Authored-By: LC <712067+lioncash@users.noreply.github.com> Co-authored-by: LC <712067+lioncash@users.noreply.github.com>
This commit is contained in:
parent
f0e3637c7a
commit
3f13e1cc24
@ -117,8 +117,8 @@ void CubebSink::SetCallback(std::function<void(s16*, std::size_t)> cb) {
|
|||||||
|
|
||||||
long CubebSink::Impl::DataCallback(cubeb_stream* stream, void* user_data, const void* input_buffer,
|
long CubebSink::Impl::DataCallback(cubeb_stream* stream, void* user_data, const void* input_buffer,
|
||||||
void* output_buffer, long num_frames) {
|
void* output_buffer, long num_frames) {
|
||||||
Impl* impl = static_cast<Impl*>(user_data);
|
auto* impl = static_cast<Impl*>(user_data);
|
||||||
s16* buffer = reinterpret_cast<s16*>(output_buffer);
|
auto* buffer = static_cast<s16*>(output_buffer);
|
||||||
|
|
||||||
if (!impl || !impl->cb) {
|
if (!impl || !impl->cb) {
|
||||||
LOG_DEBUG(Audio_Sink, "Emitting zeros");
|
LOG_DEBUG(Audio_Sink, "Emitting zeros");
|
||||||
|
Loading…
Reference in New Issue
Block a user