dsound: Make sure device buflen is initially set to ds_hel_buflen.

This commit is contained in:
Maarten Lankhorst 2007-10-13 19:41:05 +02:00 committed by Alexandre Julliard
parent d16a634c38
commit 3230ea026a

View file

@ -148,9 +148,8 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
/* on original windows, the buffer it set to a fixed size, no matter what the settings are.
on windows this size is always fixed (tested on win-xp) */
if (!device->buflen)
buflen = ds_hel_buflen;
else /* In case we move from hw accelerated to waveout */
buflen = device->buflen;
device->buflen = ds_hel_buflen;
buflen = device->buflen;
buflen -= buflen % device->pwfx->nBlockAlign;
device->buflen = buflen;