diff options
author | Chris Robinson <[email protected]> | 2020-11-24 14:47:04 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-11-24 14:47:04 -0800 |
commit | f16692ecf88a321f44ebe50f8a83bb23f13ba23a (patch) | |
tree | 36953b3baf3820859aeb36f1dda52320ce8d0bc1 /alc/backends/coreaudio.cpp | |
parent | ba39c622efc2bd0e832c0573748fec47bcc3bd6c (diff) |
Fill all buffers for CoreAudio playback
Diffstat (limited to 'alc/backends/coreaudio.cpp')
-rw-r--r-- | alc/backends/coreaudio.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp index 3a56c25f..2081e1a4 100644 --- a/alc/backends/coreaudio.cpp +++ b/alc/backends/coreaudio.cpp @@ -85,8 +85,12 @@ CoreAudioPlayback::~CoreAudioPlayback() OSStatus CoreAudioPlayback::MixerProc(AudioUnitRenderActionFlags*, const AudioTimeStamp*, UInt32, UInt32, AudioBufferList *ioData) noexcept { - mDevice->renderSamples(ioData->mBuffers[0].mData, ioData->mBuffers[0].mDataByteSize/mFrameSize, - ioData->mBuffers[0].mNumberChannels); + for(size_t i{0};i < ioData->mNumberBuffers;++i) + { + auto &buffer = ioData->mBuffers[i]; + mDevice->renderSamples(buffer.mData, buffer.mDataByteSize/mFrameSize, + buffer.mNumberChannels); + } return noErr; } |