summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-06-13 08:38:36 -0700
committerEric Laurent <elaurent@google.com>2012-06-14 10:56:59 -0700
commit192cbbad773979a6fe3b5a0c223356de4fc3309c (patch)
tree23bdbff8fd2a2b88a63a54287c6112908b050fb7
parent82233b4b5bee06f11618a558ae465abbfdedfd6e (diff)
Fix audio track pause.
AudioTrack::pause() should signal the control block condition to release threads waiting for available buffers in obtainBuffer(). Otherwise the behavior relies on the timout on the condition or the fact that audioflinger will mix a new audio buffer while executing the pause. Bug 6653769. Change-Id: I5f8f73c471fe306070f30b814f32fd4b4dc1d575
-rw-r--r--media/libmedia/AudioTrack.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 7df9b757..e5a60f5d 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -491,6 +491,7 @@ void AudioTrack::pause()
AutoMutex lock(mLock);
if (mActive) {
mActive = false;
+ mCblk->cv.signal();
mAudioTrack->pause();
}
}