diff options
author | Chris Robinson <[email protected]> | 2020-04-19 15:19:28 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-04-19 15:19:28 -0700 |
commit | b6924407253683493b1361e081475938ad4b22e6 (patch) | |
tree | 077b7f12f26e060d2b9806f01a5e801b5600ec34 /alc/backends/oboe.cpp | |
parent | 3ef6f22760d5c7d9d776f477d08925b2de4404f6 (diff) |
Trace the opened Oboe stream properties
Diffstat (limited to 'alc/backends/oboe.cpp')
-rw-r--r-- | alc/backends/oboe.cpp | 12 |
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()) { |