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

Commit fc62917d authored by Andy Hung's avatar Andy Hung
Browse files

AudioFlinger: Fix spurious underrun logging

Removes false positive errors in metrics and debugging.

Test: Play Music, check underruns
Bug: 159620406
Change-Id: I008381bbf3aae13c0fe8289a0eeec47b7780e587
parent f3f98cc2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -805,7 +805,7 @@ status_t AudioFlinger::PlaybackThread::Track::getNextBuffer(AudioBufferProvider:
    status_t status = mServerProxy->obtainBuffer(&buf);
    buffer->frameCount = buf.mFrameCount;
    buffer->raw = buf.mRaw;
    if (buf.mFrameCount == 0 && !isStopping() && !isStopped() && !isPaused()) {
    if (buf.mFrameCount == 0 && !isStopping() && !isStopped() && !isPaused() && !isOffloaded()) {
        ALOGV("%s(%d): underrun,  framesReady(%zu) < framesDesired(%zd), state: %d",
                __func__, mId, buf.mFrameCount, desiredFrames, mState);
        mAudioTrackServerProxy->tallyUnderrunFrames(desiredFrames);