mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-27 01:22:37 -06: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
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
void* output_buffer, long num_frames) {
|
||||
Impl* impl = static_cast<Impl*>(user_data);
|
||||
s16* buffer = reinterpret_cast<s16*>(output_buffer);
|
||||
auto* impl = static_cast<Impl*>(user_data);
|
||||
auto* buffer = static_cast<s16*>(output_buffer);
|
||||
|
||||
if (!impl || !impl->cb) {
|
||||
LOG_DEBUG(Audio_Sink, "Emitting zeros");
|
||||
|
|
Loading…
Reference in a new issue