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

Commit 26734fa4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "audioflinger: refresh fast track underrun state upon start"

parents 93c7af79 82991814
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -719,6 +719,11 @@ status_t AudioFlinger::PlaybackThread::Track::start(AudioSystem::sync_event_t ev
        }

        PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
        if (isFastTrack()) {
            // refresh fast track underruns upon start
            // it's essential given the same track will be recycled.
            mObservedUnderruns = playbackThread->getFastTrackUnderruns(mFastIndex);
        }
        status = playbackThread->addTrack_l(this);
        if (status == INVALID_OPERATION || status == PERMISSION_DENIED) {
            triggerEvents(AudioSystem::SYNC_EVENT_PRESENTATION_COMPLETE);