diff options
author | Robert Wu <85952307+robertwu1@users.noreply.github.com> | 2023-07-26 14:52:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 14:52:12 -0700 |
commit | ee70a64fc49194409d0a48101e0b0b2226be3527 (patch) | |
tree | aab355ff24707b4923a04de75ff5bfd5fb2d74e1 | |
parent | 78d46b4330064b14c35f267098cb92b84c25dd61 (diff) | |
download | oboe-ee70a64fc49194409d0a48101e0b0b2226be3527.tar.gz |
OboeTester: waitForStateChange should not be called in disconnect (#1875)
-rw-r--r-- | apps/OboeTester/app/src/main/cpp/jni-bridge.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/OboeTester/app/src/main/cpp/jni-bridge.cpp b/apps/OboeTester/app/src/main/cpp/jni-bridge.cpp index a98f8f72..73b0f843 100644 --- a/apps/OboeTester/app/src/main/cpp/jni-bridge.cpp +++ b/apps/OboeTester/app/src/main/cpp/jni-bridge.cpp @@ -540,7 +540,8 @@ Java_com_mobileer_oboetester_OboeAudioStream_getState(JNIEnv *env, jobject insta std::shared_ptr<oboe::AudioStream> oboeStream = engine.getCurrentActivity()->getStream(streamIndex); if (oboeStream != nullptr) { auto state = oboeStream->getState(); - if (state != oboe::StreamState::Starting && state != oboe::StreamState::Started) { + if (state != oboe::StreamState::Starting && state != oboe::StreamState::Started + && state != oboe::StreamState::Disconnected) { oboe::Result result = oboeStream->waitForStateChange( oboe::StreamState::Uninitialized, &state, 0); |