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

Commit 773810a8 authored by Phil Burk's avatar Phil Burk
Browse files

aaudio: un-suspend stream when message queue not full

This allows a stream that has severely underflowed to recover.
It used to stop playing with no error code.

Bug: 302608652
Test: atest test_full_queue
Change-Id: I329235c9be972e5d3bc0cf647943616e690b2d5c
parent 2d6e0228
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -647,6 +647,10 @@ aaudio_result_t AAudioServiceStreamBase::writeUpMessageQueue(AAudioServiceMessag
        setSuspended(true);
        return AAUDIO_ERROR_WOULD_BLOCK;
    } else {
        if (isSuspended()) {
            ALOGW("%s(): Queue no longer full. Un-suspending the stream.", __func__);
            setSuspended(false);
        }
        return AAUDIO_OK;
    }
}