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

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

am 44dc9155: am 48b6cd98: Merge "audioflinger: fix direct output underrun" into klp-dev

* commit '44dc9155':
  audioflinger: fix direct output underrun
parents 7bb88779 44dc9155
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3683,6 +3683,9 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep
                if (--(track->mRetryCount) <= 0) {
                    ALOGV("BUFFER TIMEOUT: remove(%d) from active list", track->name());
                    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
                    android_atomic_or(CBLK_DISABLED, &cblk->mFlags);
                } else if (last) {
                    mixerStatus = MIXER_TRACKS_ENABLED;
                }
@@ -4104,6 +4107,9 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr
                    ALOGV("OffloadThread: BUFFER TIMEOUT: remove(%d) from active list",
                          track->name());
                    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
                    android_atomic_or(CBLK_DISABLED, &cblk->mFlags);
                } else if (last){
                    mixerStatus = MIXER_TRACKS_ENABLED;
                }