diff options
author | Eric Laurent <elaurent@google.com> | 2013-09-23 19:00:13 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-23 19:00:13 -0700 |
commit | 3f079bb9ca87c3c1834cc5be0dafc6514938b578 (patch) | |
tree | 74007b7c109180c7e56e1fcb248e2f79a319cfa5 /media/libmedia/AudioTrack.cpp | |
parent | 3f1d3b97f723cf39fe6bde9efd0a3fc9e78028a5 (diff) | |
parent | 1d2536f460d4678770f423f50cbf6a61a13d4d11 (diff) | |
download | frameworks_av-3f079bb9ca87c3c1834cc5be0dafc6514938b578.zip frameworks_av-3f079bb9ca87c3c1834cc5be0dafc6514938b578.tar.gz frameworks_av-3f079bb9ca87c3c1834cc5be0dafc6514938b578.tar.bz2 |
am 1d2536f4: Merge "AudioTrack: fix music resume" into klp-dev
* commit '1d2536f460d4678770f423f50cbf6a61a13d4d11':
AudioTrack: fix music resume
Diffstat (limited to 'media/libmedia/AudioTrack.cpp')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index fdcf911..754a4e3 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -1800,12 +1800,12 @@ bool AudioTrack::AudioTrackThread::threadLoop() return true; } if (mPausedInt) { - mPausedInt = false; if (mPausedNs > 0) { (void) mMyCond.waitRelative(mMyLock, mPausedNs); } else { mMyCond.wait(mMyLock); } + mPausedInt = false; return true; } } @@ -1850,8 +1850,9 @@ void AudioTrack::AudioTrackThread::pause() void AudioTrack::AudioTrackThread::resume() { AutoMutex _l(mMyLock); - if (mPaused) { + if (mPaused || mPausedInt) { mPaused = false; + mPausedInt = false; mMyCond.signal(); } } |