Fix DSound UpdateSize calculation when NumUpdates is clamped

This commit is contained in:
Chris Robinson 2011-07-21 16:53:25 -07:00
parent d5ddc6acee
commit a0e5cbc47f

View File

@ -478,8 +478,8 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device)
{
if(device->NumUpdates > MAX_UPDATES)
{
device->UpdateSize = ((ALuint64)device->UpdateSize*MAX_UPDATES +
device->NumUpdates-1) / device->NumUpdates;
device->UpdateSize = (device->UpdateSize*device->NumUpdates +
MAX_UPDATES-1) / MAX_UPDATES;
device->NumUpdates = MAX_UPDATES;
}