Set the oboe stream buffer size

This commit is contained in:
Chris Robinson 2021-01-31 19:57:11 -08:00
parent 0c510416db
commit 27bcc55e81

View File

@ -135,6 +135,8 @@ bool OboePlayback::reset()
if(result != oboe::Result::OK) if(result != oboe::Result::OK)
throw al::backend_exception{al::backend_error::DeviceError, "Failed to create stream: %s", throw al::backend_exception{al::backend_error::DeviceError, "Failed to create stream: %s",
oboe::convertToText(result)}; 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())); TRACE("Got stream with properties:\n%s", oboe::convertToText(mStream.get()));
switch(mStream->getChannelCount()) switch(mStream->getChannelCount())