Commit 2b7e0168 authored by Felix Paul Kühne's avatar Felix Paul Kühne

audiounit_ios: try to handle data drops more efficiently

Needs mooar testing
parent 161a58b4
......@@ -392,9 +392,8 @@ static OSStatus RenderCallback(vlc_object_t *p_obj,
/* check if we have enough data */
if (!availableBytes) {
/* return an empty buffer so silence is played until we have data */
for (UInt32 j = 0; j < inNumberFrames; j++)
targetBuffer[j] = 0.;
/* bail out and restart unit the next time we receive some data */
Flush(p_aout, false);
} else {
memcpy(targetBuffer, buffer, __MIN(bytesToCopy, availableBytes));
TPCircularBufferConsume(&p_sys->circular_buffer, __MIN(bytesToCopy, availableBytes));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment