Initialize primary buffer on open.
This commit is contained in:
parent
6f3228a539
commit
ff77f1343e
|
@ -132,6 +132,9 @@ static HRESULT DSOUND_PrimaryOpen(IDirectSoundImpl *This)
|
||||||
|
|
||||||
if (This->state == STATE_PLAYING) This->state = STATE_STARTING;
|
if (This->state == STATE_PLAYING) This->state = STATE_STARTING;
|
||||||
else if (This->state == STATE_STOPPING) This->state = STATE_STOPPED;
|
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;
|
return err;
|
||||||
|
|
Loading…
Reference in New Issue