From 03a401e4779a287d2760376a10ef4ea415803b00 Mon Sep 17 00:00:00 2001 From: Gregory Smith Date: Tue, 2 Oct 2012 08:18:41 -0700 Subject: OSX: Set mDataByteSize correctly on AudioBuffers during render. --- src/output/osx_output_plugin.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/output/osx_output_plugin.c') diff --git a/src/output/osx_output_plugin.c b/src/output/osx_output_plugin.c index fbba81749..cd51fca20 100644 --- a/src/output/osx_output_plugin.c +++ b/src/output/osx_output_plugin.c @@ -228,9 +228,13 @@ osx_render(void *vdata, g_cond_signal(od->condition); g_mutex_unlock(od->mutex); - if (nbytes < buffer_size) - memset((unsigned char*)buffer->mData + nbytes, 0, - buffer_size - nbytes); + buffer->mDataByteSize = nbytes; + + unsigned i; + for (i = 1; i < buffer_list->mNumberBuffers; ++i) { + buffer = &buffer_list->mBuffers[i]; + buffer->mDataByteSize = 0; + } return 0; } -- cgit v1.2.3