aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/coreaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-11-24 14:47:04 -0800
committerChris Robinson <[email protected]>2020-11-24 14:47:04 -0800
commitf16692ecf88a321f44ebe50f8a83bb23f13ba23a (patch)
tree36953b3baf3820859aeb36f1dda52320ce8d0bc1 /alc/backends/coreaudio.cpp
parentba39c622efc2bd0e832c0573748fec47bcc3bd6c (diff)
Fill all buffers for CoreAudio playback
Diffstat (limited to 'alc/backends/coreaudio.cpp')
-rw-r--r--alc/backends/coreaudio.cpp8
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;
}