From 6140c79c31f5dc237fba69554de5be641cedf113 Mon Sep 17 00:00:00 2001 From: Phil Burk Date: Thu, 19 Mar 2015 14:30:21 -0700 Subject: AudioFlinger: prevent retrograde timestamps for direct mode Prevent retrograde motion in the HAL or drivers from making it up through the AudioFlinger to the app. Bug: 19604395 Change-Id: I11d6c0f7cab69e75fd4b4a2a90f64960b4bb6d5a Signed-off-by: Phil Burk --- services/audioflinger/PlaybackTracks.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'services/audioflinger/PlaybackTracks.h') diff --git a/services/audioflinger/PlaybackTracks.h b/services/audioflinger/PlaybackTracks.h index 902d5e4..45df6a9 100644 --- a/services/audioflinger/PlaybackTracks.h +++ b/services/audioflinger/PlaybackTracks.h @@ -157,8 +157,9 @@ private: bool mFlushHwPending; // track requests for thread flush // for last call to getTimestamp - bool mPreviousValid; - uint32_t mPreviousFramesWritten; + bool mPreviousTimestampValid; + // This is either the first timestamp or one that has passed + // the check to prevent retrograde motion. AudioTimestamp mPreviousTimestamp; }; // end of Track -- cgit v1.1