aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/oboe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends/oboe.cpp')
-rw-r--r--alc/backends/oboe.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/alc/backends/oboe.cpp b/alc/backends/oboe.cpp
index 8b4021c0..7137e90a 100644
--- a/alc/backends/oboe.cpp
+++ b/alc/backends/oboe.cpp
@@ -62,13 +62,12 @@ void OboePlayback::open(const ALCchar *name)
else if(std::strcmp(name, device_name) != 0)
throw al::backend_exception{ALC_INVALID_VALUE, "Device name \"%s\" not found", name};
- oboe::AudioStreamBuilder builder;
- builder.setDirection(oboe::Direction::Output);
- builder.setPerformanceMode(oboe::PerformanceMode::LowLatency);
-
- oboe::Result result{builder.openManagedStream(mStream)};
+ /* Open a basic output stream, just to ensure it can work. */
+ oboe::Result result{oboe::AudioStreamBuilder{}.setDirection(oboe::Direction::Output)
+ ->setPerformanceMode(oboe::PerformanceMode::LowLatency)
+ ->openManagedStream(mStream)};
if(result != oboe::Result::OK)
- throw al::backend_exception{ALC_INVALID_VALUE, "Failed to create stream. Error: %s",
+ throw al::backend_exception{ALC_INVALID_VALUE, "Failed to create stream: %s",
oboe::convertToText(result)};
}
@@ -133,6 +132,7 @@ bool OboePlayback::reset()
if(result != oboe::Result::OK)
throw al::backend_exception{ALC_INVALID_DEVICE, "Failed to create stream: %s",
oboe::convertToText(result)};
+ TRACE("Got stream with properties:\n%s", oboe::convertToText(mStream.get()));
switch(mStream->getChannelCount())
{