Improve AudioTrack offload timestamp startup glitch detector
New or existing glitch behavior for Nexus 5 offload audio:
we receive several 0 timestamps,
then we get a stale timestamp (very large),
then a few ms later we get a correct nonzero timestamp.
We attempt to hide the glitch because the retrograde timestamp
correction makes the glitch "sticky".
Bug: 21633313
Change-Id: I39153af718c151f9435e7d315651a811f72743da
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index ec16933..c0bc516 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -894,6 +894,7 @@
// only used for offloaded and direct tracks.
bool mPreviousTimestampValid;// true if mPreviousTimestamp is valid
+ bool mTimestampStartupGlitchReported; // reduce log spam
bool mRetrogradeMotionReported; // reduce log spam
AudioTimestamp mPreviousTimestamp; // used to detect retrograde motion