OSDN Git Service

Fix AudioTrack retrograde getPosition when restoring tracks
authorAndy Hung <hunga@google.com>
Fri, 17 Oct 2014 00:54:34 +0000 (17:54 -0700)
committerRachad Alao <rachad@google.com>
Fri, 17 Oct 2014 20:32:54 +0000 (20:32 +0000)
commitc2813e568aa476e03d159529c0af28c99536db8d
tree95bf50e96fd0bd69d892b5bf629220b9fc874f94
parent9d2189ffcf1142b2948ce3065c32521ed7d966c4
Fix AudioTrack retrograde getPosition when restoring tracks

mReleased represents the number of frames written to the
track, but was cleared on start() causing a mismatch if the
client wrote to the track before starting.  Moved the clearing
to entering the STATE_STOPPED or STATE_FLUSHED state.

Bug: 18017947
Bug: 18022276
Change-Id: I3788c98c4c3c4d9cc004378432797b3f3138e22e
media/libmedia/AudioTrack.cpp