Stop the Oboe recording stream when recording is stopped

Hopefully Oboe will retain any unread samples and let them be read.
This commit is contained in:
Chris Robinson 2021-02-02 19:12:56 -08:00
parent 63f5240db2
commit b8a4ebd594

View File

@ -321,9 +321,9 @@ void OboeCapture::start()
void OboeCapture::stop()
{
const oboe::Result result{mStream->pause()};
const oboe::Result result{mStream->stop()};
if(result != oboe::Result::OK)
throw al::backend_exception{al::backend_error::DeviceError, "Failed to pause stream: %s",
throw al::backend_exception{al::backend_error::DeviceError, "Failed to stop stream: %s",
oboe::convertToText(result)};
}