winmm: Get rid of psStopEvent which was never used like an event.
This commit is contained in:
parent
ca37dbcfe6
commit
a0dbd846c6
|
@ -49,6 +49,7 @@ typedef struct tagWINE_PLAYSOUND
|
|||
} WINE_PLAYSOUND;
|
||||
|
||||
static WINE_PLAYSOUND *PlaySoundList;
|
||||
static BOOL bPlaySoundStop;
|
||||
|
||||
static HMMIO get_mmioFromFile(LPCWSTR lpszName)
|
||||
{
|
||||
|
@ -426,7 +427,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
|
|||
mmioSeek(hmmio, mmckInfo.dwDataOffset, SEEK_SET);
|
||||
while (left)
|
||||
{
|
||||
if (WaitForSingleObject(psStopEvent, 0) == WAIT_OBJECT_0)
|
||||
if (bPlaySoundStop)
|
||||
{
|
||||
waveOutReset(hWave);
|
||||
wps->bLoop = FALSE;
|
||||
|
@ -495,13 +496,13 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo
|
|||
ResetEvent(psLastEvent);
|
||||
/* FIXME: doc says we have to stop all instances of pszSound if it's non
|
||||
* NULL... as of today, we stop all playing instances */
|
||||
SetEvent(psStopEvent);
|
||||
bPlaySoundStop = TRUE;
|
||||
|
||||
LeaveCriticalSection(&WINMM_cs);
|
||||
WaitForSingleObject(psLastEvent, INFINITE);
|
||||
EnterCriticalSection(&WINMM_cs);
|
||||
|
||||
ResetEvent(psStopEvent);
|
||||
bPlaySoundStop = FALSE;
|
||||
}
|
||||
|
||||
if (wps) wps->lpNext = PlaySoundList;
|
||||
|
|
|
@ -63,7 +63,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(winmm);
|
|||
|
||||
HINSTANCE hWinMM32Instance;
|
||||
HANDLE psLastEvent;
|
||||
HANDLE psStopEvent;
|
||||
|
||||
static CRITICAL_SECTION_DEBUG critsect_debug =
|
||||
{
|
||||
|
@ -79,7 +78,6 @@ CRITICAL_SECTION WINMM_cs = { &critsect_debug, -1, 0, 0, 0, 0 };
|
|||
static BOOL WINMM_CreateIData(HINSTANCE hInstDLL)
|
||||
{
|
||||
hWinMM32Instance = hInstDLL;
|
||||
psStopEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
|
||||
psLastEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -93,7 +91,6 @@ static void WINMM_DeleteIData(void)
|
|||
|
||||
/* FIXME: should also free content and resources allocated
|
||||
* inside WINMM_IData */
|
||||
CloseHandle(psStopEvent);
|
||||
CloseHandle(psLastEvent);
|
||||
DeleteCriticalSection(&WINMM_cs);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue