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

Commit 7b540fc5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Set PAUSING state when start pausing a stream." into main

parents f00d0225 1de7952e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -88,7 +88,8 @@ void *AAudioServiceEndpointPlay::callbackLoop() {
                }

                aaudio_stream_state_t state = clientStream->getState();
                if (state == AAUDIO_STREAM_STATE_STOPPING) {
                if (state == AAUDIO_STREAM_STATE_STOPPING ||
                    state == AAUDIO_STREAM_STATE_PAUSING) {
                    allowUnderflow = false; // just read what is already in the FIFO
                } else if (state != AAUDIO_STREAM_STATE_STARTED) {
                    continue; // this stream is not running so skip it.
+2 −0
Original line number Diff line number Diff line
@@ -307,6 +307,8 @@ aaudio_result_t AAudioServiceStreamBase::pause_l() {
            .set(AMEDIAMETRICS_PROP_STATUS, (int32_t)result)
            .record(); });

    setState(AAUDIO_STREAM_STATE_PAUSING);

    sp<AAudioServiceEndpoint> endpoint = mServiceEndpointWeak.promote();
    if (endpoint == nullptr) {
        ALOGE("%s() has no endpoint", __func__);