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

Commit f3a626fa authored by Phil Burk's avatar Phil Burk Committed by Android (Google) Code Review
Browse files

Merge "aaudio: fix crash on disconnect for shared streams"

parents 6ea4a773 4e8396f0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ void *AAudioServiceEndpointCapture::callbackLoop() {
        result = getStreamInternal()->read(mDistributionBuffer.get(),
                getFramesPerBurst(), timeoutNanos);
        if (result == AAUDIO_ERROR_DISCONNECTED) {
            disconnectRegisteredStreams();
            ALOGV("%s() read() returned AAUDIO_ERROR_DISCONNECTED, break", __func__);
            break;
        } else if (result != getFramesPerBurst()) {
            ALOGW("callbackLoop() read %d / %d",
+1 −1
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ void *AAudioServiceEndpointPlay::callbackLoop() {
        result = getStreamInternal()->write(mMixer.getOutputBuffer(),
                                            getFramesPerBurst(), timeoutNanos);
        if (result == AAUDIO_ERROR_DISCONNECTED) {
            AAudioServiceEndpointShared::disconnectRegisteredStreams();
            ALOGV("%s() write() returned AAUDIO_ERROR_DISCONNECTED, break", __func__);
            break;
        } else if (result != getFramesPerBurst()) {
            ALOGW("callbackLoop() wrote %d / %d",