diff options
author | Chris Robinson <[email protected]> | 2019-09-11 08:08:23 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-11 08:08:23 -0700 |
commit | 1a9f1e0869f7327216d57e2a44b6ba9752986152 (patch) | |
tree | 4a79cab0b4a26de8e8d69eb862c821d5a957a84e /alc/backends | |
parent | 14c76ca2447a9c905ffad6898795b2024b1a85f6 (diff) |
Fix a few more C-style casts
Diffstat (limited to 'alc/backends')
-rw-r--r-- | alc/backends/coreaudio.cpp | 2 | ||||
-rw-r--r-- | alc/backends/opensl.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp index c903ff07..39f6241a 100644 --- a/alc/backends/coreaudio.cpp +++ b/alc/backends/coreaudio.cpp @@ -585,7 +585,7 @@ ALCenum CoreAudioCapture::open(const ALCchar *name) // The output format should be the requested format, but using the hardware sample rate // This is because the AudioUnit will automatically scale other properties, except for sample rate err = AudioUnitSetProperty(mAudioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, - 1, (void*)&outputFormat, sizeof(outputFormat)); + 1, &outputFormat, sizeof(outputFormat)); if(err != noErr) { ERR("AudioUnitSetProperty failed\n"); diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp index 28305288..3ec2177f 100644 --- a/alc/backends/opensl.cpp +++ b/alc/backends/opensl.cpp @@ -849,7 +849,7 @@ void OpenSLCapture::stop() } } -ALCenum OpenSLCapture::captureSamples(void* buffer, ALCuint samples) +ALCenum OpenSLCapture::captureSamples(void *buffer, ALCuint samples) { ALsizei chunk_size = mDevice->UpdateSize * mFrameSize; SLAndroidSimpleBufferQueueItf bufferQueue; @@ -866,7 +866,8 @@ ALCenum OpenSLCapture::captureSamples(void* buffer, ALCuint samples) for(i = 0;i < samples;) { ALCuint rem{minu(samples - i, mDevice->UpdateSize - mSplOffset)}; - memcpy((ALCbyte*)buffer + i*mFrameSize, data.first.buf + mSplOffset*mFrameSize, + memcpy(static_cast<al::byte*>(buffer) + i*mFrameSize, + data.first.buf + mSplOffset*mFrameSize, rem * mFrameSize); mSplOffset += rem; |