From cd07594333cbe8b2c86c6609cce01a74d6cc33f8 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Thu, 25 Aug 2011 16:47:23 -0700 Subject: Bug 4364249 Play position is 0 after flushing AudioTrack AudioTrack::stop() is not synchronous, so a stop() followed by flush(), which is synchronous, will not always report a playhead position of 0 after being called. This CL adds a flag to mark a track as flushed, and report the correct playhead position in this state. Bug 5217011 has been created to address the real issue in the future, where flush could be made synchronous, to properly address bug 4364249. Change-Id: Icf989d41a6bcd5985bb87764c287f3edb7e26d12 --- include/media/AudioTrack.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/media') diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index df30e8c..923518d 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -481,6 +481,7 @@ private: bool mMarkerReached; uint32_t mNewPosition; uint32_t mUpdatePeriod; + bool mFlushed; // FIXME will be made obsolete by making flush() synchronous uint32_t mFlags; int mSessionId; int mAuxEffectId; -- cgit v1.1