Commit 98933362 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

dsound: Hold lock in GetStatus.

parent 3f9209eb
......@@ -465,11 +465,13 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetStatus(
}
*status = 0;
RtlAcquireResourceShared(&This->lock, TRUE);
if ((This->state == STATE_STARTING) || (This->state == STATE_PLAYING)) {
*status |= DSBSTATUS_PLAYING;
if (This->playflags & DSBPLAY_LOOPING)
*status |= DSBSTATUS_LOOPING;
}
RtlReleaseResource(&This->lock);
TRACE("status=%x\n", *status);
return DS_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment