diff options
author | Glenn Kasten <gkasten@google.com> | 2012-09-26 08:34:10 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-09-26 08:55:08 -0700 |
commit | 842c5d9553f3f8e97d04ed1bd0d37e4851240654 (patch) | |
tree | 7147d39e042bd7b4f06867168178322b811e1d65 | |
parent | cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d (diff) | |
download | frameworks_av-842c5d9553f3f8e97d04ed1bd0d37e4851240654.zip frameworks_av-842c5d9553f3f8e97d04ed1bd0d37e4851240654.tar.gz frameworks_av-842c5d9553f3f8e97d04ed1bd0d37e4851240654.tar.bz2 |
Revert "Don't wait for presentation complete if terminated"
This reverts commit 44cda3a4e7ca3de0db9cb49145def3803b03ebb4
Change-Id: I7fd29b77690dab057ac966a42fb198b2772f092c
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 599a9e2..9689654 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -3252,7 +3252,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac } //ALOGV("track %d u=%08x, s=%08x [NOT READY] on thread %p", name, cblk->user, cblk->server, this); - if ((track->sharedBuffer() != 0) || + if ((track->sharedBuffer() != 0) || track->isTerminated() || track->isStopped() || track->isPaused()) { // We have consumed all the buffers of this track. // Remove it from the list of active tracks. @@ -3272,8 +3272,8 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac track->mUnderrunCount++; // No buffers for this track. Give it a few chances to // fill a buffer, then remove it from active list. - if (--(track->mRetryCount) <= 0 || track->isTerminated()) { - ALOGV_IF(track->mRetryCount <= 0, "BUFFER TIMEOUT: remove(%d) from active list on thread %p", name, this); + if (--(track->mRetryCount) <= 0) { + ALOGV("BUFFER TIMEOUT: remove(%d) from active list on thread %p", name, this); tracksToRemove->add(track); // indicate to client process that the track was disabled because of underrun; // it will then automatically call start() when data is available @@ -3773,7 +3773,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep } //ALOGV("track %d u=%08x, s=%08x [NOT READY]", track->name(), cblk->user, cblk->server); - if ((track->sharedBuffer() != 0) || + if ((track->sharedBuffer() != 0) || track->isTerminated() || track->isStopped() || track->isPaused()) { // We have consumed all the buffers of this track. // Remove it from the list of active tracks. @@ -3791,8 +3791,8 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep } else { // No buffers for this track. Give it a few chances to // fill a buffer, then remove it from active list. - if (--(track->mRetryCount) <= 0 || track->isTerminated()) { - ALOGV_IF(track->mRetryCount <= 0, "BUFFER TIMEOUT: remove(%d) from active list", track->name()); + if (--(track->mRetryCount) <= 0) { + ALOGV("BUFFER TIMEOUT: remove(%d) from active list", track->name()); trackToRemove = track; } else { mixerStatus = MIXER_TRACKS_ENABLED; |