mirror of
https://github.com/reactos/wine.git
synced 2025-01-22 11:54:47 +00:00
Fixed synchronization issue.
This commit is contained in:
parent
681b6aa083
commit
da49807ea3
@ -563,7 +563,10 @@ void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr)
|
||||
ResetEvent(wma->hEvent);
|
||||
if (InterlockedDecrement(&wma->dwEventCount) < 0 ||
|
||||
!wma->lpAudioIndex[wma->dwCurrAudioBlock].dwOffset)
|
||||
{
|
||||
InterlockedIncrement(&wma->dwEventCount);
|
||||
break;
|
||||
}
|
||||
|
||||
mmioSeek(wma->hFile, wma->lpAudioIndex[wma->dwCurrAudioBlock].dwOffset, SEEK_SET);
|
||||
mmioRead(wma->hFile, waveHdr[whidx].lpData, wma->lpAudioIndex[wma->dwCurrAudioBlock].dwSize);
|
||||
@ -573,7 +576,6 @@ void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr)
|
||||
waveOutWrite(wma->hWave, &waveHdr[whidx], sizeof(WAVEHDR));
|
||||
wma->dwCurrAudioBlock++;
|
||||
}
|
||||
InterlockedIncrement(&wma->dwEventCount);
|
||||
}
|
||||
|
||||
LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user