summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioTrackShared.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-07-11 20:07:50 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-07-11 20:07:50 +0000
commit303d783cc3c0cc47bfd2f64ed13104e339427e34 (patch)
tree1789af4a0499afbfa010b5cc05b52d92f0b38067 /media/libmedia/AudioTrackShared.cpp
parent1c0e7a9cb2ca53c662e853421d7fa08ca5ad8538 (diff)
parent050501d11d944dcb256d37d3b86bd658d94f6a7f (diff)
downloadframeworks_av-303d783cc3c0cc47bfd2f64ed13104e339427e34.zip
frameworks_av-303d783cc3c0cc47bfd2f64ed13104e339427e34.tar.gz
frameworks_av-303d783cc3c0cc47bfd2f64ed13104e339427e34.tar.bz2
Merge "Fix AudioTrack::flush()"
Diffstat (limited to 'media/libmedia/AudioTrackShared.cpp')
-rw-r--r--media/libmedia/AudioTrackShared.cpp2
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;
}