Correct AudioHandle blocksize check, fixes
@@ -51,9 +51,9 @@ class AudioHandle::Impl
AudioHandle::Result SetBlockSize(size_t size)
{
- config_.blocksize
- = size <= kAudioMaxBufferSize ? size : kAudioMaxBufferSize;
- return size <= kAudioMaxBufferSize ? AudioHandle::Result::OK
+ size_t maxSize = kAudioMaxBufferSize / 4;
+ config_.blocksize = size <= maxSize ? size : maxSize;
+ return size <= maxSize ? AudioHandle::Result::OK
: AudioHandle::Result::ERR;
}
