[vlc-commits] audiounit_ios: try to handle data drops more efficiently
Felix Paul Kühne
git at videolan.org
Thu Apr 4 19:36:50 CEST 2013
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Apr 1 16:54:57 2013 +0200| [2b7e016807507b632b8e0a7c874030bdffb2f604] | committer: Felix Paul Kühne
audiounit_ios: try to handle data drops more efficiently
Needs mooar testing
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b7e016807507b632b8e0a7c874030bdffb2f604
---
modules/audio_output/audiounit_ios.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/audio_output/audiounit_ios.c b/modules/audio_output/audiounit_ios.c
index 24e1266..a4af9d2 100644
--- a/modules/audio_output/audiounit_ios.c
+++ b/modules/audio_output/audiounit_ios.c
@@ -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));
More information about the vlc-commits
mailing list