From c4bed92280b549ac32a43d49c3ee69a46eee0dec Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 21 Jun 2013 13:43:59 +0200 Subject: ao_coreaudio: simplify digital render callback It was reported that it also works by not setting the read size in the AudioBuffer (now idea how, but I will discover it later). --- audio/out/ao_coreaudio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'audio') diff --git a/audio/out/ao_coreaudio.c b/audio/out/ao_coreaudio.c index 2ce5b81457..9407807c9d 100644 --- a/audio/out/ao_coreaudio.c +++ b/audio/out/ao_coreaudio.c @@ -124,11 +124,10 @@ static OSStatus render_cb_digital( AudioBuffer buf = out_data->mBuffers[p->i_stream_index]; int requested = buf.mDataByteSize; - if (p->b_muted) { + if (p->b_muted) mp_ring_drain(p->buffer, requested); - } else { - buf.mDataByteSize = mp_ring_read(p->buffer, buf.mData, requested); - } + else + mp_ring_read(p->buffer, buf.mData, requested); return noErr; } -- cgit v1.2.3