aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-01-31 19:57:11 -0800
committerChris Robinson <[email protected]>2021-01-31 19:57:11 -0800
commit27bcc55e8152b9cfa1ad631e72e21f385c66a53a (patch)
tree61fb5e5fff98434de99ea158cb7c75356b91631d /alc/backends
parent0c510416db6acbc9da3536d005f7719ea1324ed1 (diff)
Set the oboe stream buffer size
Diffstat (limited to 'alc/backends')
-rw-r--r--alc/backends/oboe.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/alc/backends/oboe.cpp b/alc/backends/oboe.cpp
index 5b0d121d..a2d9e4b2 100644
--- a/alc/backends/oboe.cpp
+++ b/alc/backends/oboe.cpp
@@ -135,6 +135,8 @@ bool OboePlayback::reset()
if(result != oboe::Result::OK)
throw al::backend_exception{al::backend_error::DeviceError, "Failed to create stream: %s",
oboe::convertToText(result)};
+ mStream->setBufferSizeInFrames(mini(static_cast<int32_t>(mDevice->BufferSize),
+ mStream->getBufferCapacityInFrames()));
TRACE("Got stream with properties:\n%s", oboe::convertToText(mStream.get()));
switch(mStream->getChannelCount())