OSDN Git Service

AudioTrack: When paused, return cached playback position
authorHaynes Mathew George <hgeorge@codeaurora.org>
Wed, 8 Jan 2014 21:59:53 +0000 (13:59 -0800)
committerEric Laurent <elaurent@google.com>
Thu, 6 Mar 2014 19:38:38 +0000 (11:38 -0800)
commit7064fd2dcdfeafea53cd5a992bb78c413542f29f
treeeb8961194a192128c7db06f5c0de50f9a72b93cd
parent48588bdd9ec1102a5e96b9033d1ed8b8d6a3b3ba
AudioTrack: When paused, return cached playback position

An offload output can be re-used between two audio tracks having
the same configuration. A timestamp query for a paused track
while the other is running would return an incorrect time.
To fix this, cache the playback position on a pause() and return
this time when requested until the track is resumed.

Bug: 12826612.
Change-Id: I324112ea9827e52fff53ef44cd8513c8d85a0bc4
include/media/AudioTrack.h
media/libmedia/AudioTrack.cpp