0018-audiounit_ios-try-to-handle-data-drops-more-efficien.patch 1.2 KB

123456789101112131415161718192021222324252627282930
  1. From 13592a7641bdeecaec39af1043e5bd806f082d08 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
  3. Date: Mon, 1 Apr 2013 16:54:57 +0200
  4. Subject: [PATCH 3/4] audiounit_ios: try to handle data drops more efficiently
  5. Needs mooar testing
  6. ---
  7. modules/audio_output/audiounit_ios.c | 5 ++---
  8. 1 file changed, 2 insertions(+), 3 deletions(-)
  9. diff --git a/modules/audio_output/audiounit_ios.c b/modules/audio_output/audiounit_ios.c
  10. index 24e1266..a4af9d2 100644
  11. --- a/modules/audio_output/audiounit_ios.c
  12. +++ b/modules/audio_output/audiounit_ios.c
  13. @@ -392,9 +392,8 @@ static OSStatus RenderCallback(vlc_object_t *p_obj,
  14. /* check if we have enough data */
  15. if (!availableBytes) {
  16. - /* return an empty buffer so silence is played until we have data */
  17. - for (UInt32 j = 0; j < inNumberFrames; j++)
  18. - targetBuffer[j] = 0.;
  19. + /* bail out and restart unit the next time we receive some data */
  20. + Flush(p_aout, false);
  21. } else {
  22. memcpy(targetBuffer, buffer, __MIN(bytesToCopy, availableBytes));
  23. TPCircularBufferConsume(&p_sys->circular_buffer, __MIN(bytesToCopy, availableBytes));
  24. --
  25. 1.7.12.4 (Apple Git-37)