diff options
author | Chris Robinson <[email protected]> | 2011-07-21 18:53:15 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-07-21 18:53:15 -0700 |
commit | 0c8c3b16d232558b7c23e3cbf784fb3cfc88d792 (patch) | |
tree | 1636bf37bdb8449601ca7626fa49902a2eeba334 /Alc/mmdevapi.c | |
parent | 3d2812bd3588dec06ea4544373d870db51b2ec8f (diff) |
Round UpdateSize to the nearest multiple of MMDevAPI's period size
Diffstat (limited to 'Alc/mmdevapi.c')
-rw-r--r-- | Alc/mmdevapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/mmdevapi.c b/Alc/mmdevapi.c index b0c0b289..ffbbf963 100644 --- a/Alc/mmdevapi.c +++ b/Alc/mmdevapi.c @@ -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; |