Browse Source
Merge pull request #4722 from lioncash/casting
cubeb_sink: Use static_cast instead of reinterpret_cast in DataCallback()
pull/15/merge
bunnei
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/audio_core/cubeb_sink.cpp
|
|
@ -192,8 +192,8 @@ SinkStream& CubebSink::AcquireSinkStream(u32 sample_rate, u32 num_channels, |
|
|
|
|
|
|
|
|
long CubebSinkStream::DataCallback(cubeb_stream* stream, void* user_data, const void* input_buffer, |
|
|
long CubebSinkStream::DataCallback(cubeb_stream* stream, void* user_data, const void* input_buffer, |
|
|
void* output_buffer, long num_frames) { |
|
|
void* output_buffer, long num_frames) { |
|
|
CubebSinkStream* impl = static_cast<CubebSinkStream*>(user_data); |
|
|
|
|
|
u8* buffer = reinterpret_cast<u8*>(output_buffer); |
|
|
|
|
|
|
|
|
auto* impl = static_cast<CubebSinkStream*>(user_data); |
|
|
|
|
|
auto* buffer = static_cast<u8*>(output_buffer); |
|
|
|
|
|
|
|
|
if (!impl) { |
|
|
if (!impl) { |
|
|
return {}; |
|
|
return {}; |
|
|
|