Commit d4191c2b authored by Chris Kuiper's avatar Chris Kuiper Committed by Commit Bot

[Chromecast] Reduce min timestamp stability time

The original value of 1sec was needed to have sufficient time to establish an
accurate reference timestamp. With new audio HAL code provided by the SoM
vendor that improves timestamp jitter significantly, we can reduce the
stability time. This has the benefit of a faster playback startup time.

Bug: internal b/78129008
Test: playback tests and obverving startup times in logs
Change-Id: I2bf9a21b32dc5e6b0cf400d1d195099e56b517a7
Reviewed-on: https://chromium-review.googlesource.com/1024312Reviewed-by: default avatarKenneth MacKay <kmackay@chromium.org>
Commit-Queue: Chris Kuiper <ckuiper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552798}
parent fc81d445
......@@ -110,7 +110,7 @@ class AudioSinkAudioTrackImpl {
private static final int MIN_TIMESTAMP_STABILITY_CNT = 3;
// Minimum time timestamps need to be stable to make it a valid reference point at startup or
// after an underrun event. This is an additional safeguard.
private static final long MIN_TIMESTAMP_STABILITY_TIME_NSEC = SEC_IN_NSEC;
private static final long MIN_TIMESTAMP_STABILITY_TIME_NSEC = 150 * USEC_IN_NSEC;
// After startup, any timestamp deviating more than this amount is ignored.
private static final long TSTAMP_DEV_THRESHOLD_TO_IGNORE_NSEC = 500 * USEC_IN_NSEC;
// Don't ignore timestamps for longer than this amount of time.
......
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