Round UpdateSize to the nearest multiple of MMDevAPI's period size
This commit is contained in:
parent
3d2812bd35
commit
0c8c3b16d2
@ -496,7 +496,7 @@ static ALCboolean MMDevApiResetPlayback(ALCdevice *device)
|
||||
{
|
||||
min_len = (min_per*device->Frequency + 10000000-1) / 10000000;
|
||||
if(min_len < device->UpdateSize)
|
||||
min_len *= device->UpdateSize/min_len;
|
||||
min_len *= (device->UpdateSize + min_len/2)/min_len;
|
||||
|
||||
device->NumUpdates = (device->NumUpdates*device->UpdateSize + min_len/2) /
|
||||
min_len;
|
||||
|
Loading…
Reference in New Issue
Block a user