Loading services/oboeservice/AAudioServiceEndpointCapture.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,7 @@ void *AAudioServiceEndpointCapture::callbackLoop() { getFramesPerBurst(), timeoutNanos); if (result == AAUDIO_ERROR_DISCONNECTED) { ALOGD("%s() read() returned AAUDIO_ERROR_DISCONNECTED", __func__); // We do not need the returned vector. (void) AAudioServiceEndpointShared::disconnectRegisteredStreams(); AAudioServiceEndpointShared::handleDisconnectRegisteredStreamsAsync(); break; } else if (result != getFramesPerBurst()) { ALOGW("callbackLoop() read %d / %d", Loading services/oboeservice/AAudioServiceEndpointPlay.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -147,8 +147,7 @@ void *AAudioServiceEndpointPlay::callbackLoop() { getFramesPerBurst(), timeoutNanos); if (result == AAUDIO_ERROR_DISCONNECTED) { ALOGD("%s() write() returned AAUDIO_ERROR_DISCONNECTED", __func__); // We do not need the returned vector. (void) AAudioServiceEndpointShared::disconnectRegisteredStreams(); AAudioServiceEndpointShared::handleDisconnectRegisteredStreamsAsync(); break; } else if (result != getFramesPerBurst()) { ALOGW("callbackLoop() wrote %d / %d", Loading services/oboeservice/AAudioServiceEndpointShared.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -214,3 +214,12 @@ aaudio_result_t AAudioServiceEndpointShared::getTimestamp(int64_t *positionFrame } return result; } void AAudioServiceEndpointShared::handleDisconnectRegisteredStreamsAsync() { android::sp<AAudioServiceEndpointShared> holdEndpoint(this); std::thread asyncTask([holdEndpoint]() { // We do not need the returned vector. holdEndpoint->disconnectRegisteredStreams(); }); asyncTask.detach(); } services/oboeservice/AAudioServiceEndpointShared.h +2 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,8 @@ protected: aaudio_result_t stopSharingThread(); void handleDisconnectRegisteredStreamsAsync(); // An MMAP stream that is shared by multiple clients. android::sp<AudioStreamInternal> mStreamInternal; Loading Loading
services/oboeservice/AAudioServiceEndpointCapture.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,7 @@ void *AAudioServiceEndpointCapture::callbackLoop() { getFramesPerBurst(), timeoutNanos); if (result == AAUDIO_ERROR_DISCONNECTED) { ALOGD("%s() read() returned AAUDIO_ERROR_DISCONNECTED", __func__); // We do not need the returned vector. (void) AAudioServiceEndpointShared::disconnectRegisteredStreams(); AAudioServiceEndpointShared::handleDisconnectRegisteredStreamsAsync(); break; } else if (result != getFramesPerBurst()) { ALOGW("callbackLoop() read %d / %d", Loading
services/oboeservice/AAudioServiceEndpointPlay.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -147,8 +147,7 @@ void *AAudioServiceEndpointPlay::callbackLoop() { getFramesPerBurst(), timeoutNanos); if (result == AAUDIO_ERROR_DISCONNECTED) { ALOGD("%s() write() returned AAUDIO_ERROR_DISCONNECTED", __func__); // We do not need the returned vector. (void) AAudioServiceEndpointShared::disconnectRegisteredStreams(); AAudioServiceEndpointShared::handleDisconnectRegisteredStreamsAsync(); break; } else if (result != getFramesPerBurst()) { ALOGW("callbackLoop() wrote %d / %d", Loading
services/oboeservice/AAudioServiceEndpointShared.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -214,3 +214,12 @@ aaudio_result_t AAudioServiceEndpointShared::getTimestamp(int64_t *positionFrame } return result; } void AAudioServiceEndpointShared::handleDisconnectRegisteredStreamsAsync() { android::sp<AAudioServiceEndpointShared> holdEndpoint(this); std::thread asyncTask([holdEndpoint]() { // We do not need the returned vector. holdEndpoint->disconnectRegisteredStreams(); }); asyncTask.detach(); }
services/oboeservice/AAudioServiceEndpointShared.h +2 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,8 @@ protected: aaudio_result_t stopSharingThread(); void handleDisconnectRegisteredStreamsAsync(); // An MMAP stream that is shared by multiple clients. android::sp<AudioStreamInternal> mStreamInternal; Loading