Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
30dbb049
Commit
30dbb049
authored
21 years ago
by
Eric Pouech
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
- implemented MCI_SOUND command
- fixed MCI command table in resource - added a TODO list on MCI handling
parent
91d63c0c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/winmm/mci.c
+48
-6
48 additions, 6 deletions
dlls/winmm/mci.c
dlls/winmm/message16.c
+17
-0
17 additions, 0 deletions
dlls/winmm/message16.c
dlls/winmm/winmm_res.rc
+2
-2
2 additions, 2 deletions
dlls/winmm/winmm_res.rc
include/wine/mmsystem16.h
+5
-0
5 additions, 0 deletions
include/wine/mmsystem16.h
with
72 additions
and
8 deletions
dlls/winmm/mci.c
+
48
−
6
View file @
30dbb049
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
/*
* MCI internal functions
*
...
...
@@ -20,6 +18,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* TODO:
* - implement WINMM (32bit) multitasking and use it in all MCI drivers
* instead of the home grown one
* - 16bit mmTaskXXX functions are currently broken because the 16
* loader does not support binary command lines => provide Wine's
* own mmtask.tsk not using binary command line.
* - correctly handle the MCI_ALL_DEVICE_ID in functions.
* - finish mapping 16 <=> 32 of MCI structures and commands
* - implement auto-open feature (ie, when a string command is issued
* for a not yet opened device, MCI automatically opens it)
* - use a default registry setting to replace the [mci] section in
* configuration file (layout of info in registry should be compatible
* with all Windows' version - which use different layouts of course)
*/
#include
"config.h"
#include
"wine/port.h"
...
...
@@ -1520,6 +1533,26 @@ static DWORD MCI_Break(UINT wDevID, DWORD dwFlags, LPMCI_BREAK_PARMS lpParms)
return
dwRet
;
}
/**************************************************************************
* MCI_Sound [internal]
*/
static
DWORD
MCI_Sound
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_SOUND_PARMS
lpParms
)
{
DWORD
dwRet
=
0
;
if
(
lpParms
==
NULL
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
if
(
dwFlags
&
MCI_SOUND_NAME
)
dwRet
=
sndPlaySoundA
(
lpParms
->
lpstrSoundName
,
SND_SYNC
)
?
MMSYSERR_NOERROR
:
MMSYSERR_ERROR
;
else
dwRet
=
MMSYSERR_ERROR
;
/* what should be done ??? */
if
(
dwFlags
&
MCI_NOTIFY
)
mciDriverNotify
((
HWND
)
lpParms
->
dwCallback
,
wDevID
,
(
dwRet
==
0
)
?
MCI_NOTIFY_SUCCESSFUL
:
MCI_NOTIFY_FAILURE
);
return
dwRet
;
}
/**************************************************************************
* MCI_SendCommand [internal]
*/
...
...
@@ -1567,7 +1600,7 @@ DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1,
dwRet
=
MCI_SysInfo
(
wDevID
,
dwParam1
,
(
LPMCI_SYSINFO_PARMSA
)
dwParam2
);
pFnMciUnMapMsg16To32A
(
0
,
wMsg
,
dwParam2
);
break
;
default:
break
;
/* so that gcc doesnot
bark */
default:
break
;
/* so that gcc does
not bark */
}
}
break
;
...
...
@@ -1586,9 +1619,18 @@ DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1,
}
break
;
case
MCI_SOUND
:
/* FIXME: it seems that MCI_SOUND needs the same handling as MCI_BREAK
* but I couldn't get any doc on this MCI message
*/
if
(
bFrom32
)
{
dwRet
=
MCI_Sound
(
wDevID
,
dwParam1
,
(
LPMCI_SOUND_PARMS
)
dwParam2
);
}
else
if
(
pFnMciMapMsg16To32A
)
{
switch
(
pFnMciMapMsg16To32A
(
0
,
wMsg
,
&
dwParam2
))
{
case
WINMM_MAP_OK
:
case
WINMM_MAP_OKMEM
:
dwRet
=
MCI_Sound
(
wDevID
,
dwParam1
,
(
LPMCI_SOUND_PARMS
)
dwParam2
);
pFnMciUnMapMsg16To32A
(
0
,
wMsg
,
dwParam2
);
break
;
default:
break
;
/* so that gcc does not bark */
}
}
break
;
default:
if
(
wDevID
==
MCI_ALL_DEVICE_ID
)
{
...
...
This diff is collapsed.
Click to expand it.
dlls/winmm/message16.c
+
17
−
0
View file @
30dbb049
...
...
@@ -1995,6 +1995,20 @@ static WINMM_MapType MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam)
*
lParam
=
(
DWORD
)
msip32a
;
}
return
WINMM_MAP_OKMEM
;
case
MCI_SOUND
:
{
LPMCI_SOUND_PARMS
mbp32
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
MCI_SOUND_PARMS
));
LPMCI_SOUND_PARMS16
mbp16
=
MapSL
(
*
lParam
);
if
(
mbp32
)
{
mbp32
->
dwCallback
=
mbp16
->
dwCallback
;
mbp32
->
lpstrSoundName
=
MapSL
(
mbp16
->
lpstrSoundName
);
}
else
{
return
WINMM_MAP_NOMEM
;
}
*
lParam
=
(
DWORD
)
mbp32
;
}
return
WINMM_MAP_OKMEM
;
case
DRV_LOAD
:
case
DRV_ENABLE
:
case
DRV_OPEN
:
...
...
@@ -2065,6 +2079,7 @@ static WINMM_MapType MCI_UnMapMsg16To32A(WORD uDevType, WORD wMsg, DWORD lParam
case
MCI_ESCAPE
:
case
MCI_INFO
:
case
MCI_SYSINFO
:
case
MCI_SOUND
:
HeapFree
(
GetProcessHeap
(),
0
,
(
LPVOID
)
lParam
);
return
WINMM_MAP_OK
;
case
MCI_OPEN
:
...
...
@@ -2454,6 +2469,7 @@ static WINMM_MapType MCI_MapMsg32ATo16(WORD uDevType, WORD wMsg, DWORD dwFlags,
break
;
/* case MCI_SETTIMECODE:*/
/* case MCI_SIGNAL:*/
/* case MCI_SOUND:*/
case
MCI_SPIN
:
size
=
sizeof
(
MCI_SET_PARMS
);
break
;
...
...
@@ -2653,6 +2669,7 @@ static WINMM_MapType MCI_UnMapMsg32ATo16(WORD uDevType, WORD wMsg, DWORD dwFlag
break
;
/* case MCI_SETTIMECODE:*/
/* case MCI_SIGNAL:*/
/* case MCI_SOUND:*/
case
MCI_SPIN
:
break
;
case
MCI_STATUS
:
...
...
This diff is collapsed.
Click to expand it.
dlls/winmm/winmm_res.rc
+
2
−
2
View file @
30dbb049
...
...
@@ -405,7 +405,7 @@ END
CDAUDIO RCDATA
BEGIN
"atus\0", 0x00000814L, MCI_COMMAND_HEAD,
"
st
atus\0", 0x00000814L, MCI_COMMAND_HEAD,
"\0", 0x00000002L, MCI_RETURN,
"notify\0", 0x00000001L, MCI_FLAG,
"wait\0", 0x00000002L, MCI_FLAG,
...
...
@@ -456,7 +456,7 @@ END
SEQUENCER RCDATA
BEGIN
"atus\0", 0x00000814L, MCI_COMMAND_HEAD,
"
st
atus\0", 0x00000814L, MCI_COMMAND_HEAD,
"\0", 0x00000002L, MCI_RETURN,
"notify\0", 0x00000001L, MCI_FLAG,
"wait\0", 0x00000002L, MCI_FLAG,
...
...
This diff is collapsed.
Click to expand it.
include/wine/mmsystem16.h
+
5
−
0
View file @
30dbb049
...
...
@@ -516,6 +516,11 @@ typedef struct {
LPCSTR
lpfilename
;
}
MCI_LOAD_PARMS16
,
*
LPMCI_LOAD_PARMS16
;
typedef
struct
{
DWORD
dwCallback
;
SEGPTR
lpstrSoundName
;
}
MCI_SOUND_PARMS16
,
*
LPMCI_SOUND_PARMS16
;
typedef
struct
{
DWORD
dwCallback
;
SEGPTR
lpstrCommand
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment