diff options
| -rw-r--r-- | src/audio_core/sink/oboe_sink.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/audio_core/sink/oboe_sink.cpp b/src/audio_core/sink/oboe_sink.cpp index e61841172..466a9cc8e 100644 --- a/src/audio_core/sink/oboe_sink.cpp +++ b/src/audio_core/sink/oboe_sink.cpp | |||
| @@ -67,9 +67,13 @@ public: | |||
| 67 | oboe::AudioStreamBuilder builder; | 67 | oboe::AudioStreamBuilder builder; |
| 68 | 68 | ||
| 69 | const auto result = ConfigureBuilder(builder, direction)->openStream(temp_stream); | 69 | const auto result = ConfigureBuilder(builder, direction)->openStream(temp_stream); |
| 70 | ASSERT(result == oboe::Result::OK); | 70 | if (result == oboe::Result::OK) { |
| 71 | return temp_stream->getChannelCount() >= 6 ? 6 : 2; | ||
| 72 | } | ||
| 71 | 73 | ||
| 72 | return temp_stream->getChannelCount() >= 6 ? 6 : 2; | 74 | LOG_ERROR(Audio_Sink, "Failed to open {} stream. Using default channel count 2", |
| 75 | direction == oboe::Direction::Output ? "output" : "input"); | ||
| 76 | return 2; | ||
| 73 | } | 77 | } |
| 74 | 78 | ||
| 75 | protected: | 79 | protected: |