• Yuwei Huang's avatar
    [Remoting Mobile] Implementing AudioJitterBuffer · 5c93d5cc
    Yuwei Huang authored
    This is part of the work to rewire the audio playback logic for iOS
    (and potentially also for Android).
    
    AudioJitterBuffer acts as a jitter buffer that queues up AudioPackets
    once they are received and before they are consumed by a native playback
    queue.
    This class is basically modified from AudioPlayerBuffer with a few
    changes:
    * Allow handling packets in different stream formats/sample rate and
      call a callback when the format is changed.
    * Move the underrun protection logic from AudioPlayerIos (the
      "PRIMING" state) into the jitter buffer.
    * Fix a bug where bytes_extracted_ is ignored when copying audio data.
    * Removed the AudioStreamConsumer inheritance, Stop() and other unused
      logic.
    
    Bug: 868088
    Change-Id: Ibaee655df28de68f5303d735ef89cf15695ab2ff
    Reviewed-on: https://chromium-review.googlesource.com/1150936
    Commit-Queue: Yuwei Huang <yuweih@chromium.org>
    Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#580709}
    5c93d5cc
audio_jitter_buffer.h 3.43 KB