winmm: Add .wav extension when searching for PlaySound.
This commit is contained in:
parent
e808fb1962
commit
563a4ff08b
|
@ -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, ".");
|
||||
|
|
Loading…
Reference in New Issue