mirror of
https://github.com/reactos/wine.git
synced 2025-02-01 17:53:25 +00:00
dsound: Lock the source buffer during duplication.
This commit is contained in:
parent
ab73506528
commit
9cf7f95483
@ -1083,9 +1083,15 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
|
||||
*ppdsb = NULL;
|
||||
return DSERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
RtlAcquireResourceShared(&pdsb->lock, TRUE);
|
||||
|
||||
CopyMemory(dsb, pdsb, sizeof(*dsb));
|
||||
|
||||
dsb->pwfx = DSOUND_CopyFormat(pdsb->pwfx);
|
||||
|
||||
RtlReleaseResource(&pdsb->lock);
|
||||
|
||||
if (dsb->pwfx == NULL) {
|
||||
HeapFree(GetProcessHeap(),0,dsb);
|
||||
*ppdsb = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user