summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-10-18 15:51:31 -0700
committerGlenn Kasten <gkasten@google.com>2012-10-18 16:54:00 -0700
commit291f824e02ff517a34cfe50220b4e2b402ee998d (patch)
tree2b84bead81e60d909ad77a0ce5254b012c90abd7 /services
parentccd08439c7914d86264c7ad81bfd03cf39aaa9f7 (diff)
downloadframeworks_av-291f824e02ff517a34cfe50220b4e2b402ee998d.zip
frameworks_av-291f824e02ff517a34cfe50220b4e2b402ee998d.tar.gz
frameworks_av-291f824e02ff517a34cfe50220b4e2b402ee998d.tar.bz2
Remove active track when thread goes to standby
Bug: 7369232 Change-Id: I7ff9f525dad4be0aef562a53015b06ee7d3d50f1
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 6a35053..76d6447 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -3033,7 +3033,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac
(mOutput->stream->get_latency(mOutput->stream)*mSampleRate) / 1000;
size_t framesWritten =
mBytesWritten / audio_stream_frame_size(&mOutput->stream->common);
- if (!track->presentationComplete(framesWritten, audioHALFrames)) {
+ if (!(mStandby || track->presentationComplete(framesWritten, audioHALFrames))) {
// track stays in active list until presentation is complete
break;
}
@@ -3278,7 +3278,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac
size_t audioHALFrames = (latency_l() * mSampleRate) / 1000;
size_t framesWritten =
mBytesWritten / audio_stream_frame_size(&mOutput->stream->common);
- if (track->presentationComplete(framesWritten, audioHALFrames)) {
+ if (mStandby || track->presentationComplete(framesWritten, audioHALFrames)) {
if (track->isStopped()) {
track->reset();
}
@@ -3801,7 +3801,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep
size_t audioHALFrames = (latency_l() * mSampleRate) / 1000;
size_t framesWritten =
mBytesWritten / audio_stream_frame_size(&mOutput->stream->common);
- if (track->presentationComplete(framesWritten, audioHALFrames)) {
+ if (mStandby || track->presentationComplete(framesWritten, audioHALFrames)) {
if (track->isStopped()) {
track->reset();
}