From 753673b194e75e140f20fb6aefacc93aa411c432 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 4 Aug 2015 22:15:43 -0700 Subject: [PATCH] CoreAudio: fix build --- src/coreaudio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreaudio.cpp b/src/coreaudio.cpp index 7282591..fa14cc5 100644 --- a/src/coreaudio.cpp +++ b/src/coreaudio.cpp @@ -857,7 +857,7 @@ static OSStatus write_callback_ca(void *userdata, AudioUnitRenderActionFlags *io osca->io_data = io_data; osca->buffer_index = 0; - osca->frames_left = osca->callback_frames; + osca->frames_left = in_number_frames; outstream->write_callback(outstream, osca->frames_left, osca->frames_left); osca->io_data = nullptr; @@ -957,7 +957,7 @@ static int outstream_begin_write_ca(struct SoundIoPrivate *si, struct SoundIoOut SoundIoOutStream *outstream = &os->pub; SoundIoOutStreamCoreAudio *osca = &os->backend_data.coreaudio; - if (osca->buffer_index >= ocsa->io_data->mNumberBuffers) + if (osca->buffer_index >= osca->io_data->mNumberBuffers) return SoundIoErrorInvalid; if (*frame_count != osca->frames_left)