From 73496798e0cac656e410a013c4016bf7e3669a75 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 4 May 1999 15:29:01 +0000 Subject: [PATCH] Added PlaySound16, sndPlaySound16. --- if1632/mmsystem.spec | 4 ++-- multimedia/mmsystem.c | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/if1632/mmsystem.spec b/if1632/mmsystem.spec index 51430fc295..fb92b13f17 100644 --- a/if1632/mmsystem.spec +++ b/if1632/mmsystem.spec @@ -3,8 +3,8 @@ type win16 init MMSYSTEM_LibMain #1 pascal MMSYSTEM_WEP(word word word ptr) MMSYSTEM_WEP -2 pascal SNDPLAYSOUND(ptr word) sndPlaySoundA -3 stub PLAYSOUND +2 pascal sndPlaySound(ptr word) sndPlaySound16 +3 pascal PlaySound(ptr word long) PlaySound16 5 pascal mmsystemGetVersion() mmsystemGetVersion16 6 pascal DriverProc(long word word long long) DriverProc16 8 stub WMMMIDIRUNONCE diff --git a/multimedia/mmsystem.c b/multimedia/mmsystem.c index 0a6c279027..a9d066fa4c 100644 --- a/multimedia/mmsystem.c +++ b/multimedia/mmsystem.c @@ -30,6 +30,7 @@ #include "user.h" #include "driver.h" #include "multimedia.h" +#include "syslevel.h" #include "callback.h" #include "module.h" #include "selectors.h" @@ -381,9 +382,23 @@ BOOL WINAPI PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound) } /************************************************************************** - * sndPlaySoundA [MMSYSTEM.2][WINMM135] + * PlaySound16 [MMSYSTEM.3] */ -BOOL16 WINAPI sndPlaySoundA(LPCSTR lpszSoundName, UINT16 uFlags) +BOOL16 WINAPI PlaySound16(LPCSTR pszSound, HMODULE16 hmod, DWORD fdwSound) +{ + BOOL16 retv; + + SYSLEVEL_ReleaseWin16Lock(); + retv = PlaySoundA( pszSound, hmod, fdwSound ); + SYSLEVEL_RestoreWin16Lock(); + + return retv; +} + +/************************************************************************** + * sndPlaySoundA [WINMM135] + */ +BOOL WINAPI sndPlaySoundA(LPCSTR lpszSoundName, UINT uFlags) { PlaySound_SearchMode = 1; return PlaySoundA(lpszSoundName, 0, uFlags); @@ -392,12 +407,27 @@ BOOL16 WINAPI sndPlaySoundA(LPCSTR lpszSoundName, UINT16 uFlags) /************************************************************************** * sndPlaySoundW [WINMM.136] */ -BOOL16 WINAPI sndPlaySoundW(LPCWSTR lpszSoundName, UINT16 uFlags) +BOOL WINAPI sndPlaySoundW(LPCWSTR lpszSoundName, UINT uFlags) { PlaySound_SearchMode = 1; return PlaySoundW(lpszSoundName, 0, uFlags); } +/************************************************************************** + * sndPlaySound16 [MMSYSTEM.2] + */ +BOOL16 WINAPI sndPlaySound16(LPCSTR lpszSoundName, UINT16 uFlags) +{ + BOOL16 retv; + + SYSLEVEL_ReleaseWin16Lock(); + retv = sndPlaySoundA( lpszSoundName, uFlags ); + SYSLEVEL_RestoreWin16Lock(); + + return retv; +} + + /************************************************************************** * mmsystemGetVersion [WINMM.134] */ -- 2.32.0.93.g670b81a890