diff options
author | Eric Laurent <elaurent@google.com> | 2013-11-27 14:29:13 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2013-12-17 22:05:05 +0000 |
commit | dfeed91152cb54772b1411d7e82833ca4a48efcc (patch) | |
tree | f810edada58774d551fe674bc3b7f9507365fad7 /media/libmedia | |
parent | 9060d498be0c54d3caf84e2dbf1ba62516b3e76e (diff) | |
download | frameworks_av-dfeed91152cb54772b1411d7e82833ca4a48efcc.zip frameworks_av-dfeed91152cb54772b1411d7e82833ca4a48efcc.tar.gz frameworks_av-dfeed91152cb54772b1411d7e82833ca4a48efcc.tar.bz2 |
AudioTrack: fix position callback after restore
When restoring an AudioTrack, the next position callback point
should not be modified and set ahead of current buffer head.
Otherwise, as frames are dropped, the new position is never reached
and an application relying on position callbacks to reload the buffer
would be stalled.
Bug: 11868603.
Change-Id: I93b2a311642a0c89944b78bcc0482d4ceed98ae4
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 42516bc..0609a22 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -1691,7 +1691,6 @@ status_t AudioTrack::restoreTrack_l(const char *from) // take the frames that will be lost by track recreation into account in saved position size_t position = mProxy->getPosition() + mProxy->getFramesFilled(); - mNewPosition = position + mUpdatePeriod; size_t bufferPosition = mStaticProxy != NULL ? mStaticProxy->getBufferPosition() : 0; result = createTrack_l(mStreamType, mSampleRate, |