summaryrefslogtreecommitdiffstats
path: root/include/media/AudioTrack.h
diff options
context:
space:
mode:
authorPhil Burk <philburk@google.com>2015-04-22 10:52:21 -0700
committerPhil Burk <philburk@google.com>2015-04-29 23:36:01 +0000
commit1b42097f38e72574ed853a35f4e8a66e4739c421 (patch)
treee708293755e42bca48d47380b8b8568cfc3d2f1f /include/media/AudioTrack.h
parent5f88cdae61079be7920aee166eaac4941f65fb9f (diff)
downloadframeworks_av-1b42097f38e72574ed853a35f4e8a66e4739c421.zip
frameworks_av-1b42097f38e72574ed853a35f4e8a66e4739c421.tar.gz
frameworks_av-1b42097f38e72574ed853a35f4e8a66e4739c421.tar.bz2
AudioTrack: fix spurious retrograde messages
The retrograde motion was confused by some positions coming from the DSP on offloaded tracks. So the retrograde check was moved up into AudioTrack.cpp. This allows us to take advantage of the checks for invalid positions based on timing. Bug: 2047891 Change-Id: Ifcad2349201443a7f1711347c203297100449536 Signed-off-by: Phil Burk <philburk@google.com>
Diffstat (limited to 'include/media/AudioTrack.h')
-rw-r--r--include/media/AudioTrack.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index e7ee0ce..d361901 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -832,6 +832,9 @@ protected:
int64_t mStartUs; // the start time after flush or stop.
// only used for offloaded and direct tracks.
+ bool mPreviousTimestampValid;// true if mPreviousTimestamp is valid
+ AudioTimestamp mPreviousTimestamp; // used to detect retrograde motion
+
audio_output_flags_t mFlags;
// const after set(), except for bits AUDIO_OUTPUT_FLAG_FAST and AUDIO_OUTPUT_FLAG_OFFLOAD.
// mLock must be held to read or write those bits reliably.