Implement client playback timestamps with 64 bit accuracy
Provide server timestamps if the HAL doesn't provide it.
Provide monotonic - boottime translation.
Bug: 17472992
Bug: 26682703
Bug: 27749434
Change-Id: I6c9b213d9f9284092e34d57f52870e02c72df62a
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 7cbb6b8..00de4f0 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -1113,6 +1113,9 @@
if (!checked) { // no server info, assume drained.
mAudioTrackServerProxy->setDrained(true);
}
+ // Set correction for flushed frames that are not accounted for in released.
+ // This is important for the new 64 bit timestamps which do not reset to 0 on flush.
+ local.mFlushed = mAudioTrackServerProxy->framesFlushed();
mServerProxy->setTimestamp(local);
}