[PATCH 14/14] winmm: Allow SND_ALIAS|SND_FILENAME in PlaySound
Maarten Lankhorst
m.b.lankhorst at gmail.com
Wed Mar 17 17:41:09 CDT 2010
---
dlls/winmm/playsound.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c
index 54db68f..7b6c946 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)
{
--
1.7.0
--------------030705020606000701000302--
More information about the wine-patches
mailing list