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
8fb1e3eb
Commit
8fb1e3eb
authored
Mar 28, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Sep 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Support MCI_SOUND.
parent
95a9bc04
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
mci16.c
dlls/mmsystem.dll16/mci16.c
+1
-0
mci.c
dlls/winmm/mci.c
+17
-8
mci.c
dlls/winmm/tests/mci.c
+4
-3
No files found.
dlls/mmsystem.dll16/mci16.c
View file @
8fb1e3eb
...
...
@@ -87,6 +87,7 @@ static const char* MCI_MessageToString(UINT wMsg)
CASE
(
MCI_SAVE
);
CASE
(
MCI_SEEK
);
CASE
(
MCI_SET
);
CASE
(
MCI_SOUND
);
CASE
(
MCI_SPIN
);
CASE
(
MCI_STATUS
);
CASE
(
MCI_STEP
);
...
...
dlls/winmm/mci.c
View file @
8fb1e3eb
...
...
@@ -178,6 +178,7 @@ static const char* MCI_MessageToString(UINT wMsg)
CASE
(
MCI_SAVE
);
CASE
(
MCI_SEEK
);
CASE
(
MCI_SET
);
CASE
(
MCI_SOUND
);
CASE
(
MCI_SPIN
);
CASE
(
MCI_STATUS
);
CASE
(
MCI_STEP
);
...
...
@@ -1438,6 +1439,12 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
}
}
break
;
case
MCI_SOUND
:
/* FIXME: name is optional, "sound" is a valid command.
* FIXME: Parse "sound notify" as flag, not as name. */
((
LPMCI_SOUND_PARMSW
)
data
)
->
lpstrSoundName
=
dev
;
dwFlags
|=
MCI_SOUND_NAME
;
break
;
}
TRACE
(
"[%d, %s, %08x, %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx]
\n
"
,
...
...
@@ -1942,16 +1949,18 @@ static DWORD MCI_Break(UINT wDevID, DWORD dwFlags, LPMCI_BREAK_PARMS lpParms)
*/
static
DWORD
MCI_Sound
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_SOUND_PARMSW
lpParms
)
{
DWORD
dwRet
=
0
;
if
(
lpParms
==
NULL
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
DWORD
dwRet
;
if
(
dwFlags
&
MCI_SOUND_NAME
)
dwRet
=
sndPlaySoundW
(
lpParms
->
lpstrSoundName
,
SND_SYNC
)
?
MMSYSERR_NOERROR
:
MMSYSERR_ERROR
;
else
dwRet
=
MMSYSERR_ERROR
;
/* what should be done ??? */
if
(
dwFlags
&
MCI_SOUND_NAME
)
{
if
(
lpParms
==
NULL
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
else
dwRet
=
PlaySoundW
(
lpParms
->
lpstrSoundName
,
NULL
,
SND_ALIAS
|
(
dwFlags
&
MCI_WAIT
?
SND_SYNC
:
SND_ASYNC
))
?
0
:
MCIERR_HARDWARE
;
}
else
dwRet
=
PlaySoundW
((
LPCWSTR
)
SND_ALIAS_SYSTEMDEFAULT
,
NULL
,
SND_ALIAS_ID
|
(
dwFlags
&
MCI_WAIT
?
SND_SYNC
:
SND_ASYNC
))
?
0
:
MCIERR_HARDWARE
;
if
(
MMSYSERR_NOERROR
==
dwRet
&&
(
dwFlags
&
MCI_NOTIFY
))
if
(
!
dwRet
&&
lpParms
&&
(
dwFlags
&
MCI_NOTIFY
))
mciDriverNotify
((
HWND
)
lpParms
->
dwCallback
,
wDevID
,
MCI_NOTIFY_SUCCESSFUL
);
return
dwRet
;
}
...
...
dlls/winmm/tests/mci.c
View file @
8fb1e3eb
...
...
@@ -1057,12 +1057,13 @@ static void test_AutoOpenWAVE(HWND hwnd)
ok
(
!
err
,
"mci sysinfo waveaudio quantity open returned %s
\n
"
,
dbg_mcierr
(
err
));
if
(
!
err
)
ok
(
!
strcmp
(
buf
,
"0"
),
"sysinfo quantity open expected 0, got: %s, some more tests will fail.
\n
"
,
buf
);
/* Who knows why some machines pass all tests but return MCIERR_HARDWARE here? */
/* Who knows why some MS machines pass all tests but return MCIERR_HARDWARE here? */
/* Wine returns MCIERR_HARDWARE when no default sound is found in win.ini or the registry. */
err
=
mciSendString
(
"sound NoSuchSoundDefined wait"
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
err
==
ok_snd
||
broken
(
err
==
MCIERR_HARDWARE
),
"mci sound NoSuchSoundDefined returned %s
\n
"
,
dbg_mcierr
(
err
));
ok
(
err
==
ok_snd
||
err
==
MCIERR_HARDWARE
,
"mci sound NoSuchSoundDefined returned %s
\n
"
,
dbg_mcierr
(
err
));
err
=
mciSendString
(
"sound SystemExclamation notify wait"
,
NULL
,
0
,
hwnd
);
todo_wine
ok
(
err
==
ok_snd
||
broken
(
err
==
MCIERR_HARDWARE
),
"mci sound SystemExclamation returned %s
\n
"
,
dbg_mcierr
(
err
));
ok
(
err
==
ok_snd
||
err
==
MCIERR_HARDWARE
,
"mci sound SystemExclamation returned %s
\n
"
,
dbg_mcierr
(
err
));
test_notification
(
hwnd
,
"sound notify"
,
err
?
0
:
MCI_NOTIFY_SUCCESSFUL
);
Sleep
(
16
);
/* time to auto-close makes sysinfo below return expected error */
...
...
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