summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/PlaybackTracks.h
diff options
context:
space:
mode:
authorPhil Burk <philburk@google.com>2015-03-19 14:30:21 -0700
committerPhil Burk <philburk@google.com>2015-03-23 12:49:00 -0700
commit6140c79c31f5dc237fba69554de5be641cedf113 (patch)
tree47bd7b5544c7e76f49956629f91168e3b493add7 /services/audioflinger/PlaybackTracks.h
parent377165c24968b044faccaf366a2377fa32143e2f (diff)
downloadframeworks_av-6140c79c31f5dc237fba69554de5be641cedf113.zip
frameworks_av-6140c79c31f5dc237fba69554de5be641cedf113.tar.gz
frameworks_av-6140c79c31f5dc237fba69554de5be641cedf113.tar.bz2
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 <philburk@google.com>
Diffstat (limited to 'services/audioflinger/PlaybackTracks.h')
-rw-r--r--services/audioflinger/PlaybackTracks.h5
1 files changed, 3 insertions, 2 deletions
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