Avoid the update size going to 0 with a relatively large device period

This commit is contained in:
Chris Robinson
2018-11-28 18:45:35 -08:00
parent c3c0a5022a
commit 38f4a0cf2c
+1 -1
View File
@@ -1040,7 +1040,7 @@ HRESULT ALCwasapiPlayback::resetProxy()
min_len = (UINT32)ScaleCeil(min_per, device->Frequency, REFTIME_PER_SEC);
/* Find the nearest multiple of the period size to the update size */
if(min_len < device->UpdateSize)
min_len *= (device->UpdateSize + min_len/2)/min_len;
min_len *= maxu((device->UpdateSize + min_len/2) / min_len, 1u);
hr = mClient->GetBufferSize(&buffer_len);
}
if(FAILED(hr))