Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b1d9d43a
Commit
b1d9d43a
authored
Dec 04, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
Dec 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Don't mask out SND_ALIAS_ID or SND_FILENAME in sndPlaySound.
parent
2ddb3b7d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
playsound.c
dlls/winmm/playsound.c
+2
-2
wave.c
dlls/winmm/tests/wave.c
+33
-0
No files found.
dlls/winmm/playsound.c
View file @
b1d9d43a
...
...
@@ -560,7 +560,7 @@ BOOL WINAPI PlaySoundW(LPCWSTR pszSoundW, HMODULE hmod, DWORD fdwSound)
*/
BOOL
WINAPI
sndPlaySoundA
(
LPCSTR
pszSoundA
,
UINT
uFlags
)
{
uFlags
&=
SND_ASYNC
|
SND_LOOP
|
SND_MEMORY
|
SND_NODEFAULT
|
SND_NOSTOP
|
SND_SYNC
;
uFlags
&=
SND_A
LIAS_ID
|
SND_FILENAME
|
SND_A
SYNC
|
SND_LOOP
|
SND_MEMORY
|
SND_NODEFAULT
|
SND_NOSTOP
|
SND_SYNC
;
return
MULTIMEDIA_PlaySound
(
pszSoundA
,
0
,
uFlags
,
FALSE
);
}
...
...
@@ -569,7 +569,7 @@ BOOL WINAPI sndPlaySoundA(LPCSTR pszSoundA, UINT uFlags)
*/
BOOL
WINAPI
sndPlaySoundW
(
LPCWSTR
pszSound
,
UINT
uFlags
)
{
uFlags
&=
SND_ASYNC
|
SND_LOOP
|
SND_MEMORY
|
SND_NODEFAULT
|
SND_NOSTOP
|
SND_SYNC
;
uFlags
&=
SND_A
LIAS_ID
|
SND_FILENAME
|
SND_A
SYNC
|
SND_LOOP
|
SND_MEMORY
|
SND_NODEFAULT
|
SND_NOSTOP
|
SND_SYNC
;
return
MULTIMEDIA_PlaySound
(
pszSound
,
0
,
uFlags
,
TRUE
);
}
...
...
dlls/winmm/tests/wave.c
View file @
b1d9d43a
...
...
@@ -1443,8 +1443,41 @@ static void wave_out_tests(void)
wave_out_test_device
(
WAVE_MAPPER
);
}
static
void
test_sndPlaySound
(
void
)
{
BOOL
br
;
static
const
WCHAR
not_existW
[]
=
{
'C'
,
':'
,
'\\'
,
'n'
,
'o'
,
't'
,
'_'
,
'e'
,
'x'
,
'i'
,
's'
,
't'
,
'.'
,
'w'
,
'a'
,
'v'
,
0
};
static
const
WCHAR
SystemAsteriskW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'A'
,
's'
,
't'
,
'e'
,
'r'
,
'i'
,
's'
,
'k'
,
0
};
br
=
sndPlaySoundA
((
LPCSTR
)
SND_ALIAS_SYSTEMASTERISK
,
SND_ALIAS_ID
|
SND_SYNC
);
ok
(
br
==
TRUE
||
br
==
FALSE
,
"sndPlaySound gave strange return: %u
\n
"
,
br
);
br
=
sndPlaySoundW
((
LPCWSTR
)
SND_ALIAS_SYSTEMASTERISK
,
SND_ALIAS_ID
|
SND_SYNC
);
ok
(
br
==
TRUE
||
br
==
FALSE
,
"sndPlaySound gave strange return: %u
\n
"
,
br
);
br
=
sndPlaySoundA
((
LPCSTR
)
sndAlias
(
'X'
,
'Y'
),
SND_ALIAS_ID
|
SND_SYNC
);
ok
(
br
==
TRUE
||
br
==
FALSE
,
"sndPlaySound gave strange return: %u
\n
"
,
br
);
br
=
sndPlaySoundW
((
LPCWSTR
)
sndAlias
(
'X'
,
'Y'
),
SND_ALIAS_ID
|
SND_SYNC
);
ok
(
br
==
TRUE
||
br
==
FALSE
,
"sndPlaySound gave strange return: %u
\n
"
,
br
);
br
=
sndPlaySoundA
(
"SystemAsterisk"
,
SND_ALIAS
|
SND_SYNC
);
ok
(
br
==
TRUE
||
br
==
FALSE
,
"sndPlaySound gave strange return: %u
\n
"
,
br
);
br
=
sndPlaySoundW
(
SystemAsteriskW
,
SND_ALIAS
|
SND_SYNC
);
ok
(
br
==
TRUE
||
br
==
FALSE
,
"sndPlaySound gave strange return: %u
\n
"
,
br
);
br
=
sndPlaySoundA
(
"C:
\n
ot_exist.wav"
,
SND_FILENAME
|
SND_SYNC
);
ok
(
br
==
TRUE
||
br
==
FALSE
,
"sndPlaySound gave strange return: %u
\n
"
,
br
);
br
=
sndPlaySoundW
(
not_existW
,
SND_FILENAME
|
SND_SYNC
);
ok
(
br
==
TRUE
||
br
==
FALSE
,
"sndPlaySound gave strange return: %u
\n
"
,
br
);
}
START_TEST
(
wave
)
{
test_multiple_waveopens
();
wave_out_tests
();
test_sndPlaySound
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment