diff options
author | Glenn Kasten <gkasten@google.com> | 2013-07-11 10:35:38 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-07-11 10:35:38 -0700 |
commit | 050501d11d944dcb256d37d3b86bd658d94f6a7f (patch) | |
tree | 97c66cb8bf0f64e10a231b49c870dd8fdf4a1b51 /media/libmedia/AudioTrackShared.cpp | |
parent | 132a4fb88207075932d5dbb7970383ceb6405be7 (diff) | |
download | frameworks_av-050501d11d944dcb256d37d3b86bd658d94f6a7f.zip frameworks_av-050501d11d944dcb256d37d3b86bd658d94f6a7f.tar.gz frameworks_av-050501d11d944dcb256d37d3b86bd658d94f6a7f.tar.bz2 |
Fix AudioTrack::flush()
It was only flushing at a surface level, and even then only the first time
the server observed the client's flush request. Now it flushes at a
deeper level, but there may be even deeper device-specific flushing.
Bug: 9770947
Change-Id: I687cc3410ff9e5e5d4a5dcb9e3b129501e53d247
Diffstat (limited to 'media/libmedia/AudioTrackShared.cpp')
-rw-r--r-- | media/libmedia/AudioTrackShared.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/media/libmedia/AudioTrackShared.cpp b/media/libmedia/AudioTrackShared.cpp index 5f8f292..6bb4ff7 100644 --- a/media/libmedia/AudioTrackShared.cpp +++ b/media/libmedia/AudioTrackShared.cpp @@ -388,6 +388,8 @@ status_t ServerProxy::obtainBuffer(Buffer* buffer) if (flush != mFlush) { front = rear; mFlush = flush; + // effectively obtain then release whatever is in the buffer + android_atomic_release_store(rear, &cblk->u.mStreaming.mFront); } else { front = cblk->u.mStreaming.mFront; } |