Initialize primary buffer on open.

This commit is contained in:
Robert Reif 2005-04-11 13:00:00 +00:00 committed by Alexandre Julliard
parent 6f3228a539
commit ff77f1343e
1 changed files with 3 additions and 0 deletions

View File

@ -132,6 +132,9 @@ static HRESULT DSOUND_PrimaryOpen(IDirectSoundImpl *This)
if (This->state == STATE_PLAYING) This->state = STATE_STARTING;
else if (This->state == STATE_STOPPING) This->state = STATE_STOPPED;
This->playpos = 0;
This->mixpos = 0;
FillMemory(This->buffer, This->buflen, (This->pwfx->wBitsPerSample == 8) ? 128 : 0);
}
return err;