Commit da49807e authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Fixed synchronization issue.

parent 681b6aa0
...@@ -563,7 +563,10 @@ void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr) ...@@ -563,7 +563,10 @@ void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr)
ResetEvent(wma->hEvent); ResetEvent(wma->hEvent);
if (InterlockedDecrement(&wma->dwEventCount) < 0 || if (InterlockedDecrement(&wma->dwEventCount) < 0 ||
!wma->lpAudioIndex[wma->dwCurrAudioBlock].dwOffset) !wma->lpAudioIndex[wma->dwCurrAudioBlock].dwOffset)
{
InterlockedIncrement(&wma->dwEventCount);
break; break;
}
mmioSeek(wma->hFile, wma->lpAudioIndex[wma->dwCurrAudioBlock].dwOffset, SEEK_SET); mmioSeek(wma->hFile, wma->lpAudioIndex[wma->dwCurrAudioBlock].dwOffset, SEEK_SET);
mmioRead(wma->hFile, waveHdr[whidx].lpData, wma->lpAudioIndex[wma->dwCurrAudioBlock].dwSize); 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) ...@@ -573,7 +576,6 @@ void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr)
waveOutWrite(wma->hWave, &waveHdr[whidx], sizeof(WAVEHDR)); waveOutWrite(wma->hWave, &waveHdr[whidx], sizeof(WAVEHDR));
wma->dwCurrAudioBlock++; wma->dwCurrAudioBlock++;
} }
InterlockedIncrement(&wma->dwEventCount);
} }
LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC) LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC)
......
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