From b0337ada1abce28d86d0cd063b494b8ad66e9d73 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 17 Mar 2010 23:41:09 +0100 Subject: [PATCH] winmm: Allow SND_ALIAS|SND_FILENAME in PlaySound. --- dlls/winmm/playsound.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index 54db68f0f8e..7b6c946b25c 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -200,6 +200,7 @@ static BOOL PlaySound_IsString(DWORD fdwSound, const void* psz) case SND_MEMORY: return FALSE; case SND_ALIAS: case SND_FILENAME: + case SND_ALIAS|SND_FILENAME: case 0: return TRUE; default: FIXME("WTF\n"); return FALSE; } @@ -308,7 +309,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) TRACE("Memory sound %p\n", data); hmmio = mmioOpenW(NULL, &mminfo, MMIO_READ); } - else if (wps->fdwSound & SND_ALIAS) + if (!hmmio && wps->fdwSound & SND_ALIAS) { if ((wps->fdwSound & SND_ALIAS_ID) == SND_ALIAS_ID) { @@ -342,11 +343,11 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) } hmmio = get_mmioFromProfile(wps->fdwSound, wps->pszSound); } - else if (wps->fdwSound & SND_FILENAME) + if (!hmmio && wps->fdwSound & SND_FILENAME) { hmmio = get_mmioFromFile(wps->pszSound); } - else + if (!(wps->fdwSound & (SND_FILENAME|SND_ALIAS|SND_MEMORY))) { if ((hmmio = get_mmioFromProfile(wps->fdwSound | SND_NODEFAULT, wps->pszSound)) == 0) {