Skip to content

Commit f5ff965

Browse files
committed
fix: check for oboe start success
1 parent 03c2735 commit f5ff965

File tree

1 file changed

+4
-4
lines changed
  • packages/react-native-audio-api/android/src/main/cpp/audioapi/android/core

1 file changed

+4
-4
lines changed

packages/react-native-audio-api/android/src/main/cpp/audioapi/android/core/AudioPlayer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ bool AudioPlayer::openAudioStream() {
4747

4848
bool AudioPlayer::start() {
4949
if (mStream_) {
50-
mStream_->requestStart();
51-
return true;
50+
auto result = mStream_->requestStart();
51+
return result == oboe::Result::OK;
5252
}
5353

5454
return false;
@@ -62,8 +62,8 @@ void AudioPlayer::stop() {
6262

6363
bool AudioPlayer::resume() {
6464
if (mStream_) {
65-
mStream_->requestStart();
66-
return true;
65+
auto result = mStream_->requestStart();
66+
return result == oboe::Result::OK;
6767
}
6868

6969
return false;

0 commit comments

Comments
 (0)