Loading services/oboeservice/AAudioService.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ aaudio_handle_t AAudioService::openStream(const aaudio::AAudioStreamRequest &req aaudio_handle_t handle = mHandleTracker.put(AAUDIO_HANDLE_TYPE_STREAM, serviceStream.get()); if (handle < 0) { ALOGE("AAudioService::openStream(): handle table full"); serviceStream->close(); serviceStream.clear(); } else { ALOGD("AAudioService::openStream(): handle = 0x%08X", handle); Loading services/oboeservice/AAudioServiceStreamBase.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -42,10 +42,11 @@ AAudioServiceStreamBase::AAudioServiceStreamBase() AAudioServiceStreamBase::~AAudioServiceStreamBase() { ALOGD("AAudioServiceStreamBase::~AAudioServiceStreamBase() destroying %p", this); // If the stream is deleted without closing then audio resources will leak. // Not being closed here would indicate an internal error. So we want to find this ASAP. LOG_ALWAYS_FATAL_IF(mState != AAUDIO_STREAM_STATE_CLOSED, "service stream not closed, state = %d", mState); // If the stream is deleted when OPEN or in use then audio resources will leak. // This would indicate an internal error. So we want to find this ASAP. LOG_ALWAYS_FATAL_IF(!(mState == AAUDIO_STREAM_STATE_CLOSED || mState == AAUDIO_STREAM_STATE_UNINITIALIZED), "service stream still open, state = %d", mState); } std::string AAudioServiceStreamBase::dump() const { Loading services/oboeservice/AAudioServiceStreamBase.h +8 −0 Original line number Diff line number Diff line Loading @@ -144,8 +144,16 @@ public: mHandle = handle; } aaudio_stream_state_t getState() const { return mState; } protected: void setState(aaudio_stream_state_t state) { mState = state; } aaudio_result_t writeUpMessageQueue(AAudioServiceMessage *command); aaudio_result_t sendCurrentTimestamp(); Loading services/oboeservice/AAudioServiceStreamMMAP.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ aaudio_result_t AAudioServiceStreamMMAP::open(const aaudio::AAudioStreamRequest configurationOutput.setAudioFormat(mAudioFormat); configurationOutput.setDeviceId(deviceId); setState(AAUDIO_STREAM_STATE_OPEN); return AAUDIO_OK; } Loading services/oboeservice/AAudioServiceStreamShared.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,7 @@ aaudio_result_t AAudioServiceStreamShared::open(const aaudio::AAudioStreamReques goto error; } setState(AAUDIO_STREAM_STATE_OPEN); return AAUDIO_OK; error: Loading Loading
services/oboeservice/AAudioService.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ aaudio_handle_t AAudioService::openStream(const aaudio::AAudioStreamRequest &req aaudio_handle_t handle = mHandleTracker.put(AAUDIO_HANDLE_TYPE_STREAM, serviceStream.get()); if (handle < 0) { ALOGE("AAudioService::openStream(): handle table full"); serviceStream->close(); serviceStream.clear(); } else { ALOGD("AAudioService::openStream(): handle = 0x%08X", handle); Loading
services/oboeservice/AAudioServiceStreamBase.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -42,10 +42,11 @@ AAudioServiceStreamBase::AAudioServiceStreamBase() AAudioServiceStreamBase::~AAudioServiceStreamBase() { ALOGD("AAudioServiceStreamBase::~AAudioServiceStreamBase() destroying %p", this); // If the stream is deleted without closing then audio resources will leak. // Not being closed here would indicate an internal error. So we want to find this ASAP. LOG_ALWAYS_FATAL_IF(mState != AAUDIO_STREAM_STATE_CLOSED, "service stream not closed, state = %d", mState); // If the stream is deleted when OPEN or in use then audio resources will leak. // This would indicate an internal error. So we want to find this ASAP. LOG_ALWAYS_FATAL_IF(!(mState == AAUDIO_STREAM_STATE_CLOSED || mState == AAUDIO_STREAM_STATE_UNINITIALIZED), "service stream still open, state = %d", mState); } std::string AAudioServiceStreamBase::dump() const { Loading
services/oboeservice/AAudioServiceStreamBase.h +8 −0 Original line number Diff line number Diff line Loading @@ -144,8 +144,16 @@ public: mHandle = handle; } aaudio_stream_state_t getState() const { return mState; } protected: void setState(aaudio_stream_state_t state) { mState = state; } aaudio_result_t writeUpMessageQueue(AAudioServiceMessage *command); aaudio_result_t sendCurrentTimestamp(); Loading
services/oboeservice/AAudioServiceStreamMMAP.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ aaudio_result_t AAudioServiceStreamMMAP::open(const aaudio::AAudioStreamRequest configurationOutput.setAudioFormat(mAudioFormat); configurationOutput.setDeviceId(deviceId); setState(AAUDIO_STREAM_STATE_OPEN); return AAUDIO_OK; } Loading
services/oboeservice/AAudioServiceStreamShared.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,7 @@ aaudio_result_t AAudioServiceStreamShared::open(const aaudio::AAudioStreamReques goto error; } setState(AAUDIO_STREAM_STATE_OPEN); return AAUDIO_OK; error: Loading