diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2024-02-23 11:34:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-23 11:34:21 -0500 |
| commit | 215e887be088ed572da999e9ec7fd8559198524b (patch) | |
| tree | 793415b72d36bb07d0174dfcf731f81235008936 /src/audio_core/sink/oboe_sink.cpp | |
| parent | 0da6704fc2e45958ee2bf884128ce0ff5897ac1a (diff) | |
| parent | 964e19ab56385117ee77b12311eb4a959e3abf4a (diff) | |
Merge pull request #13100 from liamwhite/audio-ipc
audio: move to new ipc
Diffstat (limited to 'src/audio_core/sink/oboe_sink.cpp')
| -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: oboe::AudioStreamBuilder builder; const auto result = ConfigureBuilder(builder, direction)->openStream(temp_stream); - ASSERT(result == oboe::Result::OK); + if (result == oboe::Result::OK) { + return temp_stream->getChannelCount() >= 6 ? 6 : 2; + } - return temp_stream->getChannelCount() >= 6 ? 6 : 2; + LOG_ERROR(Audio_Sink, "Failed to open {} stream. Using default channel count 2", + direction == oboe::Direction::Output ? "output" : "input"); + return 2; } protected: |
