Commit 563a4ff0 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

winmm: Add .wav extension when searching for PlaySound.

parent e808fb19
......@@ -55,11 +55,12 @@ static HMMIO get_mmioFromFile(LPCWSTR lpszName)
HMMIO ret;
WCHAR buf[256];
LPWSTR dummy;
static const WCHAR dotwav[] = {'.','w','a','v',0};
ret = mmioOpenW((LPWSTR)lpszName, NULL,
MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
if (ret != 0) return ret;
if (SearchPathW(NULL, lpszName, NULL, sizeof(buf)/sizeof(buf[0]), buf, &dummy))
if (SearchPathW(NULL, lpszName, dotwav, sizeof(buf)/sizeof(buf[0]), buf, &dummy))
{
return mmioOpenW(buf, NULL,
MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
......
......@@ -1676,7 +1676,7 @@ static void test_PlaySound(void)
/* no extensions */
*exts = '\0';
br = PlaySoundA(temp, NULL, SND_FILENAME | SND_NODEFAULT);
todo_wine ok(br, "PlaySound failed, got %d\n", br);
ok(br, "PlaySound failed, got %d\n", br);
/* ends with a dot */
strcpy(exts, ".");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment