dsound: Don't deadlock in capture because of callback.

This commit is contained in:
Maarten Lankhorst 2007-04-21 20:37:26 +02:00 committed by Alexandre Julliard
parent 836776ae4f
commit 364e65a872
1 changed files with 1 additions and 1 deletions

View File

@ -895,7 +895,6 @@ IDirectSoundCaptureBufferImpl_GetCurrentPosition(
if (hres != DS_OK)
WARN("IDsCaptureDriverBuffer_GetPosition failed\n");
} else if (This->device->hwi) {
EnterCriticalSection(&(This->device->lock));
TRACE("old This->device->state=%s\n",captureStateString[This->device->state]);
if (lpdwCapturePosition) {
MMTIME mtime;
@ -907,6 +906,7 @@ IDirectSoundCaptureBufferImpl_GetCurrentPosition(
*lpdwCapturePosition = mtime.u.cb;
}
EnterCriticalSection(&(This->device->lock));
if (lpdwReadPosition) {
if (This->device->state == STATE_STARTING) {
if (lpdwCapturePosition)