summaryrefslogtreecommitdiffstats
path: root/src/audio_core/sink/oboe_sink.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-02-23 16:30:52 +0100
committerLiam <byteslice@airmail.cc>2024-02-23 16:30:52 +0100
commit964e19ab56385117ee77b12311eb4a959e3abf4a (patch)
tree6ff999862157d810823911727805bea0c9492183 /src/audio_core/sink/oboe_sink.cpp
parentaudio: fix released buffer bounds check (diff)
downloadyuzu-964e19ab56385117ee77b12311eb4a959e3abf4a.tar
yuzu-964e19ab56385117ee77b12311eb4a959e3abf4a.tar.gz
yuzu-964e19ab56385117ee77b12311eb4a959e3abf4a.tar.bz2
yuzu-964e19ab56385117ee77b12311eb4a959e3abf4a.tar.lz
yuzu-964e19ab56385117ee77b12311eb4a959e3abf4a.tar.xz
yuzu-964e19ab56385117ee77b12311eb4a959e3abf4a.tar.zst
yuzu-964e19ab56385117ee77b12311eb4a959e3abf4a.zip
Diffstat (limited to 'src/audio_core/sink/oboe_sink.cpp')
-rw-r--r--src/audio_core/sink/oboe_sink.cpp8
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: