https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ede1cf426407603f1b645b...
commit ede1cf426407603f1b645bd7bdf10e0ec0937bc0 Author: Thamatip Chitpong tangaming123456@outlook.com AuthorDate: Wed Jun 14 08:11:01 2023 +0700 Commit: Stanislav Motylkov x86corez@gmail.com CommitDate: Thu Jul 6 13:36:20 2023 +0300
[WINESYNC][WINMM] Get rid of psStopEvent which was never used like an event
Wine commit: a0dbd846c6cf111d20718170e9de2f7681d8fadf
author: Jörg Höhle hoehle@users.sourceforge.net Sat, 26 Mar 2011 11:36:49 +0000 (12:36 +0100)
committer: Alexandre Julliard julliard@winehq.org Wed, 30 Mar 2011 11:28:04 +0000 (13:28 +0200) --- dll/win32/winmm/playsound.c | 7 ++++--- dll/win32/winmm/winmm.c | 3 --- 2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dll/win32/winmm/playsound.c b/dll/win32/winmm/playsound.c index 425b50d1603..d0819b65f9b 100644 --- a/dll/win32/winmm/playsound.c +++ b/dll/win32/winmm/playsound.c @@ -35,6 +35,7 @@ typedef struct tagWINE_PLAYSOUND } WINE_PLAYSOUND;
static WINE_PLAYSOUND *PlaySoundList; +static BOOL bPlaySoundStop;
static HMMIO get_mmioFromFile(LPCWSTR lpszName) { @@ -501,7 +502,7 @@ static BOOL proc_PlaySound(WINE_PLAYSOUND *wps) mmioSeek(wps->hmmio, mmckInfo.dwDataOffset, SEEK_SET); while (left) { - if (WaitForSingleObject(psStopEvent, 0) == WAIT_OBJECT_0) + if (bPlaySoundStop) { waveOutReset(hWave); wps->bLoop = FALSE; @@ -597,13 +598,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; diff --git a/dll/win32/winmm/winmm.c b/dll/win32/winmm/winmm.c index e055a2da031..1ecf53b5385 100644 --- a/dll/win32/winmm/winmm.c +++ b/dll/win32/winmm/winmm.c @@ -49,7 +49,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(winmm);
HINSTANCE hWinMM32Instance; HANDLE psLastEvent; -HANDLE psStopEvent;
CRITICAL_SECTION WINMM_cs;
@@ -59,7 +58,6 @@ CRITICAL_SECTION WINMM_cs; static BOOL WINMM_CreateIData(HINSTANCE hInstDLL) { hWinMM32Instance = hInstDLL; - psStopEvent = CreateEventW(NULL, TRUE, FALSE, NULL); psLastEvent = CreateEventW(NULL, TRUE, FALSE, NULL); InitializeCriticalSection(&WINMM_cs); return TRUE; @@ -74,7 +72,6 @@ static void WINMM_DeleteIData(void)
/* FIXME: should also free content and resources allocated * inside WINMM_IData */ - CloseHandle(psStopEvent); CloseHandle(psLastEvent); DeleteCriticalSection(&WINMM_cs); }