Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce2e2184 authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am 37947afe: Merge "Fixed AudioFlinger not always pausing tracks" into gingerbread

Merge commit '37947afe' into gingerbread-plus-aosp

* commit '37947afe':
  Fixed AudioFlinger not always pausing tracks
parents ee7e0efc 37947afe
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1715,7 +1715,7 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track
        // The first time a track is added we wait
        // for all its buffers to be filled before processing it
        mAudioMixer->setActiveTrack(track->name());
        if (cblk->framesReady() && (track->isReady() || track->isStopped()) &&
        if (cblk->framesReady() && track->isReady() &&
                !track->isPaused() && !track->isTerminated())
        {
            //LOGV("track %d u=%08x, s=%08x [OK] on thread %p", track->name(), cblk->user, cblk->server, this);
@@ -2231,7 +2231,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop()

                // The first time a track is added we wait
                // for all its buffers to be filled before processing it
                if (cblk->framesReady() && (track->isReady() || track->isStopped()) &&
                if (cblk->framesReady() && track->isReady() &&
                        !track->isPaused() && !track->isTerminated())
                {
                    //LOGV("track %d u=%08x, s=%08x [OK]", track->name(), cblk->user, cblk->server);
@@ -3039,7 +3039,7 @@ getNextBuffer_exit:
}

bool AudioFlinger::PlaybackThread::Track::isReady() const {
    if (mFillingUpStatus != FS_FILLING) return true;
    if (mFillingUpStatus != FS_FILLING || isStopped() || isPausing()) return true;

    if (mCblk->framesReady() >= mCblk->frameCount ||
            (mCblk->flags & CBLK_FORCEREADY_MSK)) {