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
2f540b86
Commit
2f540b86
authored
Nov 08, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Remove WINE_NO_LONG_AS_INT.
parent
64410e59
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
209 additions
and
215 deletions
+209
-215
Makefile.in
dlls/winmm/Makefile.in
+1
-1
driver.c
dlls/winmm/driver.c
+5
-5
lolvldrv.c
dlls/winmm/lolvldrv.c
+8
-8
mci.c
dlls/winmm/mci.c
+23
-23
message16.c
dlls/winmm/message16.c
+55
-57
mmio.c
dlls/winmm/mmio.c
+21
-21
mmsystem.c
dlls/winmm/mmsystem.c
+33
-33
playsound.c
dlls/winmm/playsound.c
+7
-7
sound16.c
dlls/winmm/sound16.c
+1
-5
time.c
dlls/winmm/time.c
+3
-3
winemm.h
dlls/winmm/winemm.h
+6
-6
winmm.c
dlls/winmm/winmm.c
+46
-46
No files found.
dlls/winmm/Makefile.in
View file @
2f540b86
EXTRADEFS
=
-D_WINMM_
-DWINE_NO_LONG_AS_INT
EXTRADEFS
=
-D_WINMM_
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../..
SRCDIR
=
@srcdir@
...
...
dlls/winmm/driver.c
View file @
2f540b86
...
...
@@ -573,21 +573,21 @@ BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev,
UINT
wMsg
,
DWORD
dwUser
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
TRACE
(
"(%08
lX, %04X, %p, %04X, %08lX, %08lX, %08l
X); !
\n
"
,
TRACE
(
"(%08
X, %04X, %p, %04X, %08X, %08X, %08
X); !
\n
"
,
dwCallBack
,
uFlags
,
hDev
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
switch
(
uFlags
&
DCB_TYPEMASK
)
{
case
DCB_NULL
:
TRACE
(
"Null !
\n
"
);
if
(
dwCallBack
)
WARN
(
"uFlags=%04X has null DCB value, but dwCallBack=%08
l
X is not null !
\n
"
,
uFlags
,
dwCallBack
);
WARN
(
"uFlags=%04X has null DCB value, but dwCallBack=%08X is not null !
\n
"
,
uFlags
,
dwCallBack
);
break
;
case
DCB_WINDOW
:
TRACE
(
"Window(%04
l
X) handle=%p!
\n
"
,
dwCallBack
,
hDev
);
TRACE
(
"Window(%04X) handle=%p!
\n
"
,
dwCallBack
,
hDev
);
PostMessageA
((
HWND
)
dwCallBack
,
wMsg
,
(
WPARAM
)
hDev
,
dwParam1
);
break
;
case
DCB_TASK
:
/* aka DCB_THREAD */
TRACE
(
"Task(%04
l
x) !
\n
"
,
dwCallBack
);
TRACE
(
"Task(%04x) !
\n
"
,
dwCallBack
);
PostThreadMessageA
(
dwCallBack
,
wMsg
,
(
WPARAM
)
hDev
,
dwParam1
);
break
;
case
DCB_FUNCTION
:
...
...
@@ -595,7 +595,7 @@ BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev,
((
LPDRVCALLBACK
)
dwCallBack
)(
hDev
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
break
;
case
DCB_EVENT
:
TRACE
(
"Event(%08
l
x) !
\n
"
,
dwCallBack
);
TRACE
(
"Event(%08x) !
\n
"
,
dwCallBack
);
SetEvent
((
HANDLE
)
dwCallBack
);
break
;
case
6
:
/* I would dub it DCB_MMTHREADSIGNAL */
...
...
dlls/winmm/lolvldrv.c
View file @
2f540b86
...
...
@@ -189,7 +189,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
WINMM_MapType
map
;
int
devID
;
TRACE
(
"(%s %u %u 0x%08
l
x 0x%08lx 0x%08lx %c)
\n
"
,
TRACE
(
"(%s %u %u 0x%08x 0x%08lx 0x%08lx %c)
\n
"
,
llTypes
[
mld
->
type
].
typestr
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
,
bFrom32
?
'Y'
:
'N'
);
...
...
@@ -223,7 +223,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
assert
(
part
->
u
.
fnMessage32
);
if
(
bFrom32
)
{
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08
l
x p1=0x%08lx p2=0x%08lx)
\n
"
,
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08x p1=0x%08lx p2=0x%08lx)
\n
"
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
ret
=
part
->
u
.
fnMessage32
(
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
TRACE
(
"=> %s
\n
"
,
WINMM_ErrorToString
(
ret
));
...
...
@@ -239,7 +239,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
break
;
case
WINMM_MAP_OK
:
case
WINMM_MAP_OKMEM
:
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08
l
x p1=0x%08lx p2=0x%08lx)
\n
"
,
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08x p1=0x%08lx p2=0x%08lx)
\n
"
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
ret
=
part
->
u
.
fnMessage32
(
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
...
...
@@ -268,7 +268,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
break
;
case
WINMM_MAP_OK
:
case
WINMM_MAP_OKMEM
:
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08
l
x p1=0x%08lx p2=0x%08lx)
\n
"
,
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08x p1=0x%08lx p2=0x%08lx)
\n
"
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
ret
=
pFnCallMMDrvFunc16
((
DWORD
)
part
->
u
.
fnMessage16
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
...
...
@@ -283,7 +283,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
break
;
}
}
else
{
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08
l
x p1=0x%08lx p2=0x%08lx)
\n
"
,
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08x p1=0x%08lx p2=0x%08lx)
\n
"
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
ret
=
pFnCallMMDrvFunc16
((
DWORD
)
part
->
u
.
fnMessage16
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
...
...
@@ -298,7 +298,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
* MMDRV_Alloc [internal]
*/
LPWINE_MLD
MMDRV_Alloc
(
UINT
size
,
UINT
type
,
LPHANDLE
hndl
,
DWORD
*
dwFlags
,
DWORD
*
dwCallback
,
DWORD
*
dwInstance
,
BOOL
bFrom32
)
DWORD
_PTR
*
dwCallback
,
DWORD_PTR
*
dwInstance
,
BOOL
bFrom32
)
{
LPWINE_MLD
mld
;
UINT
i
;
...
...
@@ -370,7 +370,7 @@ DWORD MMDRV_Open(LPWINE_MLD mld, UINT wMsg, DWORD dwParam1, DWORD dwFlags)
DWORD
dwRet
=
MMSYSERR_BADDEVICEID
;
DWORD
dwInstance
;
WINE_LLTYPE
*
llType
=
&
llTypes
[
mld
->
type
];
TRACE
(
"(%p, %04x, 0x%08
lx, 0x%08l
x)
\n
"
,
mld
,
wMsg
,
dwParam1
,
dwFlags
);
TRACE
(
"(%p, %04x, 0x%08
x, 0x%08
x)
\n
"
,
mld
,
wMsg
,
dwParam1
,
dwFlags
);
mld
->
dwDriverInstance
=
(
DWORD
)
&
dwInstance
;
...
...
@@ -490,7 +490,7 @@ UINT MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD dwParam1,
{
WINE_MM_DRIVER
*
lpDrv
=
&
MMDrvs
[
mld
->
mmdIndex
];
TRACE
(
"(%p, %04x, %08
lx, %08l
x)
\n
"
,
mld
,
uMsg
,
dwParam1
,
dwParam2
);
TRACE
(
"(%p, %04x, %08
x, %08
x)
\n
"
,
mld
,
uMsg
,
dwParam1
,
dwParam2
);
/* all those function calls are undocumented */
switch
(
uMsg
)
{
...
...
dlls/winmm/mci.c
View file @
2f540b86
...
...
@@ -1429,7 +1429,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
*/
if
(
lpstrRet
&&
uRetLen
)
*
lpstrRet
=
'\0'
;
TRACE
(
"[%d, %s, %08
lx, %08lx/%s %08lx/%s %08lx/%s %08lx/%s %08lx/%s %08l
x/%s]
\n
"
,
TRACE
(
"[%d, %s, %08
x, %08x/%s %08x/%s %08x/%s %08x/%s %08x/%s %08
x/%s]
\n
"
,
wmd
->
wDeviceID
,
MCI_MessageToString
(
MCI_GetMessage
(
lpCmd
)),
dwFlags
,
data
[
0
],
debugstr_w
((
WCHAR
*
)
data
[
0
]),
data
[
1
],
debugstr_w
((
WCHAR
*
)
data
[
1
]),
data
[
2
],
debugstr_w
((
WCHAR
*
)
data
[
2
]),
data
[
3
],
debugstr_w
((
WCHAR
*
)
data
[
3
]),
...
...
@@ -1442,9 +1442,9 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
}
else
{
dwRet
=
MCI_SendCommand
(
wmd
->
wDeviceID
,
MCI_GetMessage
(
lpCmd
),
dwFlags
,
(
DWORD
)
data
,
TRUE
);
}
TRACE
(
"=> 1/ %
l
x (%s)
\n
"
,
dwRet
,
debugstr_w
(
lpstrRet
));
TRACE
(
"=> 1/ %x (%s)
\n
"
,
dwRet
,
debugstr_w
(
lpstrRet
));
dwRet
=
MCI_HandleReturnValues
(
dwRet
,
wmd
,
retType
,
data
,
lpstrRet
,
uRetLen
);
TRACE
(
"=> 2/ %
l
x (%s)
\n
"
,
dwRet
,
debugstr_w
(
lpstrRet
));
TRACE
(
"=> 2/ %x (%s)
\n
"
,
dwRet
,
debugstr_w
(
lpstrRet
));
errCleanUp:
HeapFree
(
GetProcessHeap
(),
0
,
verb
);
...
...
@@ -1498,7 +1498,7 @@ BOOL WINAPI mciExecute(LPCSTR lpstrCommand)
ret
=
mciSendStringA
(
lpstrCommand
,
strRet
,
sizeof
(
strRet
),
0
);
if
(
ret
!=
0
)
{
if
(
!
mciGetErrorStringA
(
ret
,
strRet
,
sizeof
(
strRet
)))
{
sprintf
(
strRet
,
"Unknown MCI error (%
l
d)"
,
ret
);
sprintf
(
strRet
,
"Unknown MCI error (%d)"
,
ret
);
}
MessageBoxA
(
0
,
strRet
,
"Error in mciExecute()"
,
MB_OK
);
}
...
...
@@ -1639,7 +1639,7 @@ static DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSW lpParms)
DWORD
dwRet
;
LPWINE_MCIDRIVER
wmd
=
NULL
;
TRACE
(
"(%08
l
X, %p)
\n
"
,
dwParam
,
lpParms
);
TRACE
(
"(%08X, %p)
\n
"
,
dwParam
,
lpParms
);
if
(
lpParms
==
NULL
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
/* only two low bytes are generic, the other ones are dev type specific */
...
...
@@ -1741,13 +1741,13 @@ static DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSW lpParms)
}
if
((
dwRet
=
MCI_FinishOpen
(
wmd
,
lpParms
,
dwParam
)))
{
TRACE
(
"Failed to open driver (MCI_OPEN_DRIVER) [%08
l
x], closing
\n
"
,
dwRet
);
TRACE
(
"Failed to open driver (MCI_OPEN_DRIVER) [%08x], closing
\n
"
,
dwRet
);
/* FIXME: is dwRet the correct ret code ? */
goto
errCleanUp
;
}
/* only handled devices fall through */
TRACE
(
"wDevID=%04X wDeviceID=%d dwRet=%
l
d
\n
"
,
wmd
->
wDeviceID
,
lpParms
->
wDeviceID
,
dwRet
);
TRACE
(
"wDevID=%04X wDeviceID=%d dwRet=%d
\n
"
,
wmd
->
wDeviceID
,
lpParms
->
wDeviceID
,
dwRet
);
if
(
dwParam
&
MCI_NOTIFY
)
mciDriverNotify
((
HWND
)
lpParms
->
dwCallback
,
wmd
->
wDeviceID
,
MCI_NOTIFY_SUCCESSFUL
);
...
...
@@ -1769,7 +1769,7 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
DWORD
dwRet
;
LPWINE_MCIDRIVER
wmd
;
TRACE
(
"(%04x, %08
l
X, %p)
\n
"
,
wDevID
,
dwParam
,
lpParms
);
TRACE
(
"(%04x, %08X, %p)
\n
"
,
wDevID
,
dwParam
,
lpParms
);
if
(
wDevID
==
MCI_ALL_DEVICE_ID
)
{
LPWINE_MCIDRIVER
next
;
...
...
@@ -1837,7 +1837,7 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm
if
(
lpParms
==
NULL
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
TRACE
(
"(%08x, %08
lX, %08lX[num=%l
d, wDevTyp=%u])
\n
"
,
TRACE
(
"(%08x, %08
X, %08X[num=%
d, wDevTyp=%u])
\n
"
,
uDevID
,
dwFlags
,
(
DWORD
)
lpParms
,
lpParms
->
dwNumber
,
lpParms
->
wDeviceType
);
switch
(
dwFlags
&
~
MCI_SYSINFO_OPEN
)
{
...
...
@@ -1875,7 +1875,7 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm
}
}
*
(
DWORD
*
)
lpParms
->
lpstrReturn
=
cnt
;
TRACE
(
"(%
ld) => '%l
d'
\n
"
,
lpParms
->
dwNumber
,
*
(
DWORD
*
)
lpParms
->
lpstrReturn
);
TRACE
(
"(%
d) => '%
d'
\n
"
,
lpParms
->
dwNumber
,
*
(
DWORD
*
)
lpParms
->
lpstrReturn
);
ret
=
MCI_INTEGER_RETURNED
;
break
;
case
MCI_SYSINFO_INSTALLNAME
:
...
...
@@ -1887,7 +1887,7 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm
*
lpParms
->
lpstrReturn
=
0
;
ret
=
MCIERR_INVALID_DEVICE_ID
;
}
TRACE
(
"(%
l
d) => %s
\n
"
,
lpParms
->
dwNumber
,
debugstr_w
(
lpParms
->
lpstrReturn
));
TRACE
(
"(%d) => %s
\n
"
,
lpParms
->
dwNumber
,
debugstr_w
(
lpParms
->
lpstrReturn
));
break
;
case
MCI_SYSINFO_NAME
:
TRACE
(
"MCI_SYSINFO_NAME
\n
"
);
...
...
@@ -1911,7 +1911,7 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm
if
(
!
s
)
{
if
(
GetPrivateProfileStringW
(
wszMci
,
0
,
wszNull
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]),
wszSystemIni
))
{
for
(
p
=
buf
;
*
p
;
p
+=
strlenW
(
p
)
+
1
,
cnt
++
)
{
TRACE
(
"%
l
d: %s
\n
"
,
cnt
,
debugstr_w
(
p
));
TRACE
(
"%d: %s
\n
"
,
cnt
,
debugstr_w
(
p
));
if
(
cnt
==
lpParms
->
dwNumber
-
1
)
{
s
=
p
;
break
;
...
...
@@ -1921,10 +1921,10 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm
}
ret
=
s
?
MCI_WriteString
(
lpParms
->
lpstrReturn
,
lpParms
->
dwRetSize
/
sizeof
(
WCHAR
),
s
)
:
MCIERR_OUTOFRANGE
;
}
TRACE
(
"(%
l
d) => %s
\n
"
,
lpParms
->
dwNumber
,
debugstr_w
(
lpParms
->
lpstrReturn
));
TRACE
(
"(%d) => %s
\n
"
,
lpParms
->
dwNumber
,
debugstr_w
(
lpParms
->
lpstrReturn
));
break
;
default:
TRACE
(
"Unsupported flag value=%08
l
x
\n
"
,
dwFlags
);
TRACE
(
"Unsupported flag value=%08x
\n
"
,
dwFlags
);
ret
=
MCIERR_UNRECOGNIZED_COMMAND
;
}
return
ret
;
...
...
@@ -1969,8 +1969,8 @@ static DWORD MCI_Sound(UINT wDevID, DWORD dwFlags, LPMCI_SOUND_PARMSW lpParms)
/**************************************************************************
* MCI_SendCommand [internal]
*/
DWORD
MCI_SendCommand
(
UINT
wDevID
,
UINT16
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
,
BOOL
bFrom32
)
DWORD
MCI_SendCommand
(
UINT
wDevID
,
UINT16
wMsg
,
DWORD
_PTR
dwParam1
,
DWORD
_PTR
dwParam2
,
BOOL
bFrom32
)
{
DWORD
dwRet
=
MCIERR_UNRECOGNIZED_COMMAND
;
...
...
@@ -2086,7 +2086,7 @@ LRESULT MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2)
LPMCI_GETDEVCAPS_PARMS
lmgp
;
lmgp
=
(
LPMCI_GETDEVCAPS_PARMS
)(
void
*
)
dwParam2
;
TRACE
(
"Changing %08
lx to %08lx
\n
"
,
lmgp
->
dwReturn
,
(
DWORD
)
LOWORD
(
lmgp
->
dwReturn
));
TRACE
(
"Changing %08
x to %08x
\n
"
,
lmgp
->
dwReturn
,
LOWORD
(
lmgp
->
dwReturn
));
lmgp
->
dwReturn
=
LOWORD
(
lmgp
->
dwReturn
);
}
break
;
...
...
@@ -2109,7 +2109,7 @@ LRESULT MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2)
LPMCI_STATUS_PARMS
lsp
;
lsp
=
(
LPMCI_STATUS_PARMS
)(
void
*
)
dwParam2
;
TRACE
(
"Changing %08
lx to %08lx
\n
"
,
lsp
->
dwReturn
,
(
DWORD
)
LOWORD
(
lsp
->
dwReturn
));
TRACE
(
"Changing %08
x to %08x
\n
"
,
lsp
->
dwReturn
,
LOWORD
(
lsp
->
dwReturn
));
lsp
->
dwReturn
=
LOWORD
(
lsp
->
dwReturn
);
}
break
;
...
...
@@ -2210,7 +2210,7 @@ BOOL WINAPI mciSetDriverData(MCIDEVICEID uDeviceID, DWORD data)
{
LPWINE_MCIDRIVER
wmd
;
TRACE
(
"(%04x, %08
l
x)
\n
"
,
uDeviceID
,
data
);
TRACE
(
"(%04x, %08x)
\n
"
,
uDeviceID
,
data
);
wmd
=
MCI_GetDriver
(
uDeviceID
);
...
...
@@ -2236,7 +2236,7 @@ DWORD WINAPI mciSendCommandW(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1,
dwRet
=
MCI_SendCommand
(
wDevID
,
wMsg
,
dwParam1
,
dwParam2
,
TRUE
);
dwRet
=
MCI_CleanUp
(
dwRet
,
wMsg
,
dwParam2
);
TRACE
(
"=> %08
l
x
\n
"
,
dwRet
);
TRACE
(
"=> %08x
\n
"
,
dwRet
);
return
dwRet
;
}
...
...
@@ -2309,7 +2309,7 @@ UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data)
{
INT16
ret
;
TRACE
(
"(0x%04x, 0x%08
l
x)
\n
"
,
wDevID
,
data
);
TRACE
(
"(0x%04x, 0x%08x)
\n
"
,
wDevID
,
data
);
if
((
HIWORD
(
data
)
!=
0
&&
HWND_16
(
GetActiveWindow
())
!=
HIWORD
(
data
))
||
(
GetAsyncKeyState
(
LOWORD
(
data
))
&
1
)
==
0
)
{
...
...
@@ -2332,7 +2332,7 @@ BOOL WINAPI mciSetYieldProc(MCIDEVICEID uDeviceID, YIELDPROC fpYieldProc, DWORD
{
LPWINE_MCIDRIVER
wmd
;
TRACE
(
"(%u, %p, %08
l
x)
\n
"
,
uDeviceID
,
fpYieldProc
,
dwYieldData
);
TRACE
(
"(%u, %p, %08x)
\n
"
,
uDeviceID
,
fpYieldProc
,
dwYieldData
);
if
(
!
(
wmd
=
MCI_GetDriver
(
uDeviceID
)))
{
WARN
(
"Bad uDeviceID
\n
"
);
...
...
@@ -2370,7 +2370,7 @@ UINT WINAPI mciGetDeviceIDFromElementIDW(DWORD dwElementID, LPCWSTR lpstrType)
/* FIXME: that's rather strange, there is no
* mciGetDeviceIDFromElementID32A in winmm.spec
*/
FIXME
(
"(%
l
u, %s) stub
\n
"
,
dwElementID
,
debugstr_w
(
lpstrType
));
FIXME
(
"(%u, %s) stub
\n
"
,
dwElementID
,
debugstr_w
(
lpstrType
));
return
0
;
}
...
...
dlls/winmm/message16.c
View file @
2f540b86
...
...
@@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(winmm);
/**************************************************************************
* MMDRV_Callback [internal]
*/
static
void
MMDRV_Callback
(
LPWINE_MLD
mld
,
HDRVR
hDev
,
UINT
uMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
static
void
MMDRV_Callback
(
LPWINE_MLD
mld
,
HDRVR
hDev
,
UINT
uMsg
,
DWORD
_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
TRACE
(
"CB (*%08lx)(%p %08x %08lx %08lx %08lx
\n
"
,
mld
->
dwCallback
,
hDev
,
uMsg
,
mld
->
dwClientInstance
,
dwParam1
,
dwParam2
);
...
...
@@ -70,7 +70,7 @@ static void MMDRV_Callback(LPWINE_MLD mld, HDRVR hDev, UINT uMsg, DWORD dwParam
/**************************************************************************
* MMDRV_Aux_Map16To32W [internal]
*/
static
WINMM_MapType
MMDRV_Aux_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_Aux_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -78,7 +78,7 @@ static WINMM_MapType MMDRV_Aux_Map16To32W (UINT wMsg, LPDWORD lpdwUser, LPDWOR
/**************************************************************************
* MMDRV_Aux_UnMap16To32W [internal]
*/
static
WINMM_MapType
MMDRV_Aux_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_Aux_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -86,7 +86,7 @@ static WINMM_MapType MMDRV_Aux_UnMap16To32W(UINT wMsg, LPDWORD lpdwUser, LPDWOR
/**************************************************************************
* MMDRV_Aux_Map32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_Aux_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_Aux_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -94,7 +94,7 @@ static WINMM_MapType MMDRV_Aux_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LPDWOR
/**************************************************************************
* MMDRV_Aux_UnMap32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_Aux_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_Aux_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
#if 0
case AUXDM_GETDEVCAPS:
...
...
@@ -111,7 +111,7 @@ static WINMM_MapType MMDRV_Aux_UnMap32WTo16(UINT wMsg, LPDWORD lpdwUser, LPDWOR
/**************************************************************************
* MMDRV_Aux_Callback [internal]
*/
static
void
CALLBACK
MMDRV_Aux_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
dwInstance
,
DWORD
dwParam1
,
DWORD
dwParam2
)
static
void
CALLBACK
MMDRV_Aux_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
_PTR
dwInstance
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
LPWINE_MLD
mld
=
(
LPWINE_MLD
)
dwInstance
;
...
...
@@ -126,7 +126,7 @@ static void CALLBACK MMDRV_Aux_Callback(HDRVR hDev, UINT uMsg, DWORD dwInstance
/**************************************************************************
* xMMDRV_Mixer_Map16To32W [internal]
*/
static
WINMM_MapType
MMDRV_Mixer_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_Mixer_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -134,7 +134,7 @@ static WINMM_MapType MMDRV_Mixer_Map16To32W (UINT wMsg, LPDWORD lpdwUser, LPDW
/**************************************************************************
* MMDRV_Mixer_UnMap16To32W [internal]
*/
static
WINMM_MapType
MMDRV_Mixer_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_Mixer_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
#if 0
MIXERCAPSA micA;
...
...
@@ -156,7 +156,7 @@ static WINMM_MapType MMDRV_Mixer_UnMap16To32W(UINT wMsg, LPDWORD lpdwUser, LPDW
/**************************************************************************
* MMDRV_Mixer_Map32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_Mixer_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_Mixer_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -164,7 +164,7 @@ static WINMM_MapType MMDRV_Mixer_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LPDW
/**************************************************************************
* MMDRV_Mixer_UnMap32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_Mixer_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_Mixer_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -172,7 +172,7 @@ static WINMM_MapType MMDRV_Mixer_UnMap32WTo16(UINT wMsg, LPDWORD lpdwUser, LPDW
/**************************************************************************
* MMDRV_Mixer_Callback [internal]
*/
static
void
CALLBACK
MMDRV_Mixer_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
dwInstance
,
DWORD
dwParam1
,
DWORD
dwParam2
)
static
void
CALLBACK
MMDRV_Mixer_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
_PTR
dwInstance
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
LPWINE_MLD
mld
=
(
LPWINE_MLD
)
dwInstance
;
...
...
@@ -187,7 +187,7 @@ static void CALLBACK MMDRV_Mixer_Callback(HDRVR hDev, UINT uMsg, DWORD dwInstan
/**************************************************************************
* MMDRV_MidiIn_Map16To32W [internal]
*/
static
WINMM_MapType
MMDRV_MidiIn_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_MidiIn_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -195,7 +195,7 @@ static WINMM_MapType MMDRV_MidiIn_Map16To32W (UINT wMsg, LPDWORD lpdwUser, LPD
/**************************************************************************
* MMDRV_MidiIn_UnMap16To32W [internal]
*/
static
WINMM_MapType
MMDRV_MidiIn_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_MidiIn_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -203,7 +203,7 @@ static WINMM_MapType MMDRV_MidiIn_UnMap16To32W(UINT wMsg, LPDWORD lpdwUser, LPD
/**************************************************************************
* MMDRV_MidiIn_Map32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_MidiIn_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_MidiIn_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -211,7 +211,7 @@ static WINMM_MapType MMDRV_MidiIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LPD
/**************************************************************************
* MMDRV_MidiIn_UnMap32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_MidiIn_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_MidiIn_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
return
WINMM_MAP_MSGERROR
;
}
...
...
@@ -219,7 +219,7 @@ static WINMM_MapType MMDRV_MidiIn_UnMap32WTo16(UINT wMsg, LPDWORD lpdwUser, LPD
/**************************************************************************
* MMDRV_MidiIn_Callback [internal]
*/
static
void
CALLBACK
MMDRV_MidiIn_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
dwInstance
,
DWORD
dwParam1
,
DWORD
dwParam2
)
static
void
CALLBACK
MMDRV_MidiIn_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
_PTR
dwInstance
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
LPWINE_MLD
mld
=
(
LPWINE_MLD
)
dwInstance
;
...
...
@@ -275,7 +275,7 @@ static void CALLBACK MMDRV_MidiIn_Callback(HDRVR hDev, UINT uMsg, DWORD dwInsta
/**************************************************************************
* MMDRV_MidiOut_Map16To32W [internal]
*/
static
WINMM_MapType
MMDRV_MidiOut_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_MidiOut_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -348,7 +348,7 @@ static WINMM_MapType MMDRV_MidiOut_Map16To32W (UINT wMsg, LPDWORD lpdwUser, LP
*
lpParam2
=
sizeof
(
MIDIHDR
);
/* dwBufferLength can be reduced between prepare & write */
if
(
wMsg
==
MODM_LONGDATA
&&
mh32
->
dwBufferLength
<
mh16
->
dwBufferLength
)
{
ERR
(
"Size of buffer has been increased from %
ld to %l
d, keeping initial value
\n
"
,
ERR
(
"Size of buffer has been increased from %
d to %
d, keeping initial value
\n
"
,
mh32
->
dwBufferLength
,
mh16
->
dwBufferLength
);
}
else
mh32
->
dwBufferLength
=
mh16
->
dwBufferLength
;
...
...
@@ -368,7 +368,7 @@ static WINMM_MapType MMDRV_MidiOut_Map16To32W (UINT wMsg, LPDWORD lpdwUser, LP
/**************************************************************************
* MMDRV_MidiOut_UnMap16To32W [internal]
*/
static
WINMM_MapType
MMDRV_MidiOut_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_MidiOut_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -440,7 +440,7 @@ static WINMM_MapType MMDRV_MidiOut_UnMap16To32W(UINT wMsg, LPDWORD lpdwUser, LP
/**************************************************************************
* MMDRV_MidiOut_Map32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_MidiOut_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_MidiOut_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -491,9 +491,8 @@ static WINMM_MapType MMDRV_MidiOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LP
mh32
->
lpNext
=
(
LPMIDIHDR
)
mh16
;
/* for reuse in unprepare and write */
mh32
->
reserved
=
*
lpParam2
;
TRACE
(
"mh16=%08lx mh16->lpData=%08lx mh32->buflen=%lu mh32->lpData=%08lx
\n
"
,
*
lpParam1
,
(
DWORD
)
mh16
->
lpData
,
mh32
->
dwBufferLength
,
(
DWORD
)
mh32
->
lpData
);
TRACE
(
"mh16=%08lx mh16->lpData=%p mh32->buflen=%u mh32->lpData=%p
\n
"
,
*
lpParam1
,
mh16
->
lpData
,
mh32
->
dwBufferLength
,
mh32
->
lpData
);
*
lpParam2
=
sizeof
(
MIDIHDR
);
ret
=
WINMM_MAP_OKMEM
;
...
...
@@ -516,12 +515,12 @@ static WINMM_MapType MMDRV_MidiOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LP
*
lpParam1
=
MapLS
(
mh16
);
*
lpParam2
=
sizeof
(
MIDIHDR
);
TRACE
(
"mh16=%08lx mh16->lpData=%
08lx mh32->buflen=%lu mh32->lpData=%08lx
\n
"
,
*
lpParam1
,
(
DWORD
)
mh16
->
lpData
,
mh32
->
dwBufferLength
,
(
DWORD
)
mh32
->
lpData
);
TRACE
(
"mh16=%08lx mh16->lpData=%
p mh32->buflen=%u mh32->lpData=%p
\n
"
,
*
lpParam1
,
mh16
->
lpData
,
mh32
->
dwBufferLength
,
mh32
->
lpData
);
/* dwBufferLength can be reduced between prepare & write */
if
(
wMsg
==
MODM_LONGDATA
&&
mh16
->
dwBufferLength
<
mh32
->
dwBufferLength
)
{
ERR
(
"Size of buffer has been increased from %
ld to %l
d, keeping initial value
\n
"
,
ERR
(
"Size of buffer has been increased from %
d to %
d, keeping initial value
\n
"
,
mh16
->
dwBufferLength
,
mh32
->
dwBufferLength
);
}
else
mh16
->
dwBufferLength
=
mh32
->
dwBufferLength
;
...
...
@@ -580,7 +579,7 @@ static WINMM_MapType MMDRV_MidiOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LP
/**************************************************************************
* MMDRV_MidiOut_UnMap32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_MidiOut_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_MidiOut_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -658,7 +657,7 @@ static WINMM_MapType MMDRV_MidiOut_UnMap32WTo16(UINT wMsg, LPDWORD lpdwUser, LP
/**************************************************************************
* MMDRV_MidiOut_Callback [internal]
*/
static
void
CALLBACK
MMDRV_MidiOut_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
dwInstance
,
DWORD
dwParam1
,
DWORD
dwParam2
)
static
void
CALLBACK
MMDRV_MidiOut_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
_PTR
dwInstance
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
LPWINE_MLD
mld
=
(
LPWINE_MLD
)
dwInstance
;
...
...
@@ -706,7 +705,7 @@ static void CALLBACK MMDRV_MidiOut_Callback(HDRVR hDev, UINT uMsg, DWORD dwInst
/**************************************************************************
* MMDRV_WaveIn_Map16To32W [internal]
*/
static
WINMM_MapType
MMDRV_WaveIn_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_WaveIn_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -793,7 +792,7 @@ static WINMM_MapType MMDRV_WaveIn_Map16To32W (UINT wMsg, LPDWORD lpdwUser, LPD
*
lpParam2
=
sizeof
(
WAVEHDR
);
/* dwBufferLength can be reduced between prepare & write */
if
(
wMsg
==
WIDM_ADDBUFFER
&&
wh32
->
dwBufferLength
<
wh16
->
dwBufferLength
)
{
ERR
(
"Size of buffer has been increased from %
ld to %l
d, keeping initial value
\n
"
,
ERR
(
"Size of buffer has been increased from %
d to %
d, keeping initial value
\n
"
,
wh32
->
dwBufferLength
,
wh16
->
dwBufferLength
);
}
else
wh32
->
dwBufferLength
=
wh16
->
dwBufferLength
;
...
...
@@ -815,7 +814,7 @@ static WINMM_MapType MMDRV_WaveIn_Map16To32W (UINT wMsg, LPDWORD lpdwUser, LPD
/**************************************************************************
* MMDRV_WaveIn_UnMap16To32W [internal]
*/
static
WINMM_MapType
MMDRV_WaveIn_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_WaveIn_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -888,7 +887,7 @@ static WINMM_MapType MMDRV_WaveIn_UnMap16To32W(UINT wMsg, LPDWORD lpdwUser, LPD
/**************************************************************************
* MMDRV_WaveIn_Map32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_WaveIn_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_WaveIn_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -969,9 +968,9 @@ static WINMM_MapType MMDRV_WaveIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LPD
/* FIXME: nothing on wh32->lpNext */
/* could link the wh32->lpNext at this level for memory house keeping */
wh32
->
lpNext
=
wh16
;
/* for reuse in unprepare and write */
TRACE
(
"wh16=%08
lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
(
DWORD
)
wh16
->
lpData
,
wh32
->
dwBufferLength
,
(
DWORD
)
wh32
->
lpData
);
TRACE
(
"wh16=%08
x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
*
lpParam1
=
seg_ptr
+
sizeof
(
LPWAVEHDR
);
*
lpParam2
=
sizeof
(
WAVEHDR
);
...
...
@@ -991,9 +990,8 @@ static WINMM_MapType MMDRV_WaveIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LPD
assert
(
*
(
LPWAVEHDR
*
)
ptr
==
wh32
);
TRACE
(
"wh16=%08lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
(
DWORD
)
wh16
->
lpData
,
wh32
->
dwBufferLength
,
(
DWORD
)
wh32
->
lpData
);
TRACE
(
"wh16=%08x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
if
(
wMsg
==
WIDM_ADDBUFFER
)
memcpy
((
LPSTR
)
wh16
+
sizeof
(
WAVEHDR
),
wh32
->
lpData
,
wh32
->
dwBufferLength
);
...
...
@@ -1002,7 +1000,7 @@ static WINMM_MapType MMDRV_WaveIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LPD
*
lpParam2
=
sizeof
(
WAVEHDR
);
/* dwBufferLength can be reduced between prepare & write */
if
(
wMsg
==
WIDM_ADDBUFFER
&&
wh16
->
dwBufferLength
<
wh32
->
dwBufferLength
)
{
ERR
(
"Size of buffer has been increased from %
ld to %l
d, keeping initial value
\n
"
,
ERR
(
"Size of buffer has been increased from %
d to %
d, keeping initial value
\n
"
,
wh16
->
dwBufferLength
,
wh32
->
dwBufferLength
);
}
else
wh16
->
dwBufferLength
=
wh32
->
dwBufferLength
;
...
...
@@ -1058,7 +1056,7 @@ static WINMM_MapType MMDRV_WaveIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LPD
/**************************************************************************
* MMDRV_WaveIn_UnMap32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_WaveIn_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_WaveIn_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -1153,7 +1151,7 @@ static WINMM_MapType MMDRV_WaveIn_UnMap32WTo16(UINT wMsg, LPDWORD lpdwUser, LPD
/**************************************************************************
* MMDRV_WaveIn_Callback [internal]
*/
static
void
CALLBACK
MMDRV_WaveIn_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
dwInstance
,
DWORD
dwParam1
,
DWORD
dwParam2
)
static
void
CALLBACK
MMDRV_WaveIn_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
_PTR
dwInstance
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
LPWINE_MLD
mld
=
(
LPWINE_MLD
)
dwInstance
;
...
...
@@ -1197,7 +1195,7 @@ static void CALLBACK MMDRV_WaveIn_Callback(HDRVR hDev, UINT uMsg, DWORD dwInsta
/**************************************************************************
* MMDRV_WaveOut_Map16To32W [internal]
*/
static
WINMM_MapType
MMDRV_WaveOut_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_WaveOut_Map16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -1294,7 +1292,7 @@ static WINMM_MapType MMDRV_WaveOut_Map16To32W (UINT wMsg, LPDWORD lpdwUser, LP
*
lpParam2
=
sizeof
(
WAVEHDR
);
/* dwBufferLength can be reduced between prepare & write */
if
(
wMsg
==
WODM_WRITE
&&
wh32
->
dwBufferLength
<
wh16
->
dwBufferLength
)
{
ERR
(
"Size of buffer has been increased from %
ld to %l
d, keeping initial value
\n
"
,
ERR
(
"Size of buffer has been increased from %
d to %
d, keeping initial value
\n
"
,
wh32
->
dwBufferLength
,
wh16
->
dwBufferLength
);
}
else
wh32
->
dwBufferLength
=
wh16
->
dwBufferLength
;
...
...
@@ -1315,7 +1313,7 @@ static WINMM_MapType MMDRV_WaveOut_Map16To32W (UINT wMsg, LPDWORD lpdwUser, LP
/**************************************************************************
* MMDRV_WaveOut_UnMap16To32W [internal]
*/
static
WINMM_MapType
MMDRV_WaveOut_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_WaveOut_UnMap16To32W
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
WINMM_MapType
ret
=
WINMM_MAP_MSGERROR
;
...
...
@@ -1399,7 +1397,7 @@ static WINMM_MapType MMDRV_WaveOut_UnMap16To32W(UINT wMsg, LPDWORD lpdwUser, LP
/**************************************************************************
* MMDRV_WaveOut_Map32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_WaveOut_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
)
static
WINMM_MapType
MMDRV_WaveOut_Map32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
)
{
WINMM_MapType
ret
;
...
...
@@ -1530,9 +1528,9 @@ static WINMM_MapType MMDRV_WaveOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LP
/* FIXME: nothing on wh32->lpNext */
/* could link the wh32->lpNext at this level for memory house keeping */
wh32
->
lpNext
=
wh16
;
/* for reuse in unprepare and write */
TRACE
(
"wh16=%08
lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
(
DWORD
)
wh16
->
lpData
,
wh32
->
dwBufferLength
,
(
DWORD
)
wh32
->
lpData
);
TRACE
(
"wh16=%08
x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
*
lpParam1
=
seg_ptr
+
sizeof
(
LPWAVEHDR
);
*
lpParam2
=
sizeof
(
WAVEHDR
);
...
...
@@ -1552,9 +1550,9 @@ static WINMM_MapType MMDRV_WaveOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LP
assert
(
*
(
LPWAVEHDR
*
)
ptr
==
wh32
);
TRACE
(
"wh16=%08
lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
(
DWORD
)
wh16
->
lpData
,
wh32
->
dwBufferLength
,
(
DWORD
)
wh32
->
lpData
);
TRACE
(
"wh16=%08
x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
if
(
wMsg
==
WODM_WRITE
)
memcpy
((
LPSTR
)
wh16
+
sizeof
(
WAVEHDR
),
wh32
->
lpData
,
wh32
->
dwBufferLength
);
...
...
@@ -1563,7 +1561,7 @@ static WINMM_MapType MMDRV_WaveOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LP
*
lpParam2
=
sizeof
(
WAVEHDR
);
/* dwBufferLength can be reduced between prepare & write */
if
(
wMsg
==
WODM_WRITE
&&
wh16
->
dwBufferLength
<
wh32
->
dwBufferLength
)
{
ERR
(
"Size of buffer has been increased from %
ld to %l
d, keeping initial value
\n
"
,
ERR
(
"Size of buffer has been increased from %
d to %
d, keeping initial value
\n
"
,
wh16
->
dwBufferLength
,
wh32
->
dwBufferLength
);
}
else
wh16
->
dwBufferLength
=
wh32
->
dwBufferLength
;
...
...
@@ -1588,7 +1586,7 @@ static WINMM_MapType MMDRV_WaveOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, LP
/**************************************************************************
* MMDRV_WaveOut_UnMap32WTo16 [internal]
*/
static
WINMM_MapType
MMDRV_WaveOut_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
fn_ret
)
static
WINMM_MapType
MMDRV_WaveOut_UnMap32WTo16
(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
fn_ret
)
{
WINMM_MapType
ret
;
...
...
@@ -1701,7 +1699,7 @@ static WINMM_MapType MMDRV_WaveOut_UnMap32WTo16(UINT wMsg, LPDWORD lpdwUser, LP
/**************************************************************************
* MMDRV_WaveOut_Callback [internal]
*/
static
void
CALLBACK
MMDRV_WaveOut_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
dwInstance
,
DWORD
dwParam1
,
DWORD
dwParam2
)
static
void
CALLBACK
MMDRV_WaveOut_Callback
(
HDRVR
hDev
,
UINT
uMsg
,
DWORD
_PTR
dwInstance
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
LPWINE_MLD
mld
=
(
LPWINE_MLD
)
dwInstance
;
...
...
@@ -1780,9 +1778,9 @@ static BOOL MMDRV_GetDescription16(const char* fname, char* buf, int buflen)
if
(
w
!=
(
'Z'
*
256
+
'M'
))
E
((
"Bad sig %04x
\n
"
,
w
));
if
(
_llseek
(
hFile
,
0x3C
,
SEEK_SET
)
<
0
)
E
((
"Can't seek to ext header offset
\n
"
));
if
(
_lread
(
hFile
,
&
dw
,
4
)
!=
4
)
E
((
"Can't read ext header offset
\n
"
));
if
(
_llseek
(
hFile
,
dw
+
0x2C
,
SEEK_SET
)
<
0
)
E
((
"Can't seek to ext header.nr table %
l
u
\n
"
,
dw
+
0x2C
));
if
(
_llseek
(
hFile
,
dw
+
0x2C
,
SEEK_SET
)
<
0
)
E
((
"Can't seek to ext header.nr table %u
\n
"
,
dw
+
0x2C
));
if
(
_lread
(
hFile
,
&
dw
,
4
)
!=
4
)
E
((
"Can't read nr table offset
\n
"
));
if
(
_llseek
(
hFile
,
dw
,
SEEK_SET
)
<
0
)
E
((
"Can't seek to nr table %
l
u
\n
"
,
dw
));
if
(
_llseek
(
hFile
,
dw
,
SEEK_SET
)
<
0
)
E
((
"Can't seek to nr table %u
\n
"
,
dw
));
if
(
_lread
(
hFile
,
buf
,
1
)
!=
1
)
E
((
"Can't read descr length
\n
"
));
buflen
=
min
((
int
)(
unsigned
)(
BYTE
)
buf
[
0
],
buflen
-
1
);
if
(
_lread
(
hFile
,
buf
,
buflen
)
!=
buflen
)
E
((
"Can't read descr (%d)
\n
"
,
buflen
));
...
...
@@ -3426,7 +3424,7 @@ static WINMM_MapType MCI_UnMapMsg32WTo16(WORD uDevType, WORD wMsg, DWORD dwFlag
if
(
mdsp16
)
{
mdsp32a
->
dwReturn
=
mdsp16
->
dwReturn
;
if
(
dwFlags
&
MCI_DGV_STATUS_DISKSPACE
)
{
TRACE
(
"MCI_STATUS (DGV) lpstrDrive=%08
l
x
\n
"
,
mdsp16
->
lpstrDrive
);
TRACE
(
"MCI_STATUS (DGV) lpstrDrive=%08x
\n
"
,
mdsp16
->
lpstrDrive
);
TRACE
(
"MCI_STATUS (DGV) lpstrDrive=%s
\n
"
,
(
LPSTR
)
MapSL
(
mdsp16
->
lpstrDrive
));
UnMapLS
(
mdsp16
->
lpstrDrive
);
}
...
...
dlls/winmm/mmio.c
View file @
2f540b86
...
...
@@ -260,7 +260,7 @@ LPMMIOPROC MMIO_InstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
struct
IOProcList
*
pListNode
;
struct
IOProcList
**
ppListNode
;
TRACE
(
"(%08
lx, %p, %08l
X, %i)
\n
"
,
fccIOProc
,
pIOProc
,
dwFlags
,
type
);
TRACE
(
"(%08
x, %p, %08
X, %i)
\n
"
,
fccIOProc
,
pIOProc
,
dwFlags
,
type
);
if
(
dwFlags
&
MMIO_GLOBALPROC
)
FIXME
(
"Global procedures not implemented
\n
"
);
...
...
@@ -525,7 +525,7 @@ static LONG MMIO_GrabNextBuffer(LPWINE_MMIO wm, int for_read)
{
LONG
size
=
wm
->
info
.
cchBuffer
;
TRACE
(
"bo=%
lx do=%l
x of=%lx
\n
"
,
TRACE
(
"bo=%
x do=%
x of=%lx
\n
"
,
wm
->
info
.
lBufOffset
,
wm
->
info
.
lDiskOffset
,
send_message
(
wm
->
ioProc
,
&
wm
->
info
,
MMIOM_SEEK
,
0
,
SEEK_CUR
,
MMIO_PROC_32A
));
...
...
@@ -553,11 +553,11 @@ static LONG MMIO_GrabNextBuffer(LPWINE_MMIO wm, int for_read)
static
MMRESULT
MMIO_SetBuffer
(
WINE_MMIO
*
wm
,
void
*
pchBuffer
,
LONG
cchBuffer
,
UINT
uFlags
)
{
TRACE
(
"(%p %p %
l
d %u)
\n
"
,
wm
,
pchBuffer
,
cchBuffer
,
uFlags
);
TRACE
(
"(%p %p %d %u)
\n
"
,
wm
,
pchBuffer
,
cchBuffer
,
uFlags
);
if
(
uFlags
)
return
MMSYSERR_INVALPARAM
;
if
(
cchBuffer
>
0xFFFF
)
WARN
(
"Untested handling of huge mmio buffers (%
l
d >= 64k)
\n
"
,
cchBuffer
);
WARN
(
"Untested handling of huge mmio buffers (%d >= 64k)
\n
"
,
cchBuffer
);
if
(
MMIO_Flush
(
wm
,
0
)
!=
MMSYSERR_NOERROR
)
return
MMIOERR_CANNOTWRITE
;
...
...
@@ -598,7 +598,7 @@ HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
LPWINE_MMIO
wm
;
MMIOINFO
mmioinfo
;
TRACE
(
"('%s', %p, %08
l
X, %d);
\n
"
,
szFileName
,
refmminfo
,
dwOpenFlags
,
type
);
TRACE
(
"('%s', %p, %08X, %d);
\n
"
,
szFileName
,
refmminfo
,
dwOpenFlags
,
type
);
if
(
!
refmminfo
)
{
refmminfo
=
&
mmioinfo
;
...
...
@@ -759,7 +759,7 @@ LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
LPWINE_MMIO
wm
;
LONG
count
;
TRACE
(
"(%p, %p, %
l
d);
\n
"
,
hmmio
,
pch
,
cch
);
TRACE
(
"(%p, %p, %d);
\n
"
,
hmmio
,
pch
,
cch
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
-
1
;
...
...
@@ -797,7 +797,7 @@ LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
}
}
TRACE
(
"count=%
l
d
\n
"
,
count
);
TRACE
(
"count=%d
\n
"
,
count
);
return
count
;
}
...
...
@@ -809,7 +809,7 @@ LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch)
LPWINE_MMIO
wm
;
LONG
count
;
TRACE
(
"(%p, %p, %
l
d);
\n
"
,
hmmio
,
pch
,
cch
);
TRACE
(
"(%p, %p, %d);
\n
"
,
hmmio
,
pch
,
cch
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
-
1
;
...
...
@@ -852,7 +852,7 @@ LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch)
wm
->
info
.
lBufOffset
=
wm
->
info
.
lDiskOffset
;
}
TRACE
(
"bytes written=%
l
d
\n
"
,
count
);
TRACE
(
"bytes written=%d
\n
"
,
count
);
return
count
;
}
...
...
@@ -864,7 +864,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
LPWINE_MMIO
wm
;
LONG
offset
;
TRACE
(
"(%p, %08
l
X, %d);
\n
"
,
hmmio
,
lOffset
,
iOrigin
);
TRACE
(
"(%p, %08X, %d);
\n
"
,
hmmio
,
lOffset
,
iOrigin
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -918,7 +918,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
wm
->
info
.
pchNext
=
wm
->
info
.
pchBuffer
+
(
offset
-
wm
->
info
.
lBufOffset
);
TRACE
(
"=> %
l
d
\n
"
,
offset
);
TRACE
(
"=> %d
\n
"
,
offset
);
return
offset
;
}
...
...
@@ -976,7 +976,7 @@ MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT
{
LPWINE_MMIO
wm
;
TRACE
(
"(hmmio=%p, pchBuf=%p, cchBuf=%
l
d, uFlags=%#08x)
\n
"
,
TRACE
(
"(hmmio=%p, pchBuf=%p, cchBuf=%d, uFlags=%#08x)
\n
"
,
hmmio
,
pchBuffer
,
cchBuffer
,
uFlags
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
...
...
@@ -1149,10 +1149,10 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
return
MMSYSERR_INVALPARAM
;
dwOldPos
=
mmioSeek
(
hmmio
,
0
,
SEEK_CUR
);
TRACE
(
"dwOldPos=%
l
d
\n
"
,
dwOldPos
);
TRACE
(
"dwOldPos=%d
\n
"
,
dwOldPos
);
if
(
lpckParent
!=
NULL
)
{
TRACE
(
"seek inside parent at %
l
d !
\n
"
,
lpckParent
->
dwDataOffset
);
TRACE
(
"seek inside parent at %d !
\n
"
,
lpckParent
->
dwDataOffset
);
/* EPP: was dwOldPos = mmioSeek(hmmio,lpckParent->dwDataOffset,SEEK_SET); */
if
(
dwOldPos
<
lpckParent
->
dwDataOffset
||
dwOldPos
>=
lpckParent
->
dwDataOffset
+
lpckParent
->
cksize
)
{
...
...
@@ -1201,7 +1201,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
}
lpck
->
dwDataOffset
=
dwOldPos
+
2
*
sizeof
(
DWORD
);
TRACE
(
"ckid=%4.4s fcc=%4.4s cksize=%08
l
X !
\n
"
,
TRACE
(
"ckid=%4.4s fcc=%4.4s cksize=%08X !
\n
"
,
(
LPCSTR
)
&
lpck
->
ckid
,
srchType
?
(
LPCSTR
)
&
lpck
->
fccType
:
"<na>"
,
lpck
->
cksize
);
...
...
@@ -1222,7 +1222,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
mmioSeek
(
hmmio
,
lpck
->
dwDataOffset
+
sizeof
(
DWORD
),
SEEK_SET
);
else
mmioSeek
(
hmmio
,
lpck
->
dwDataOffset
,
SEEK_SET
);
TRACE
(
"lpck: ckid=%.4s, cksize=%
ld, dwDataOffset=%ld fccType=%08l
X (%.4s)!
\n
"
,
TRACE
(
"lpck: ckid=%.4s, cksize=%
d, dwDataOffset=%d fccType=%08
X (%.4s)!
\n
"
,
(
LPSTR
)
&
lpck
->
ckid
,
lpck
->
cksize
,
lpck
->
dwDataOffset
,
lpck
->
fccType
,
srchType
?
(
LPSTR
)
&
lpck
->
fccType
:
""
);
return
MMSYSERR_NOERROR
;
...
...
@@ -1240,10 +1240,10 @@ MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags)
TRACE
(
"Chunk is dirty, checking if chunk's size is correct
\n
"
);
dwOldPos
=
mmioSeek
(
hmmio
,
0
,
SEEK_CUR
);
TRACE
(
"dwOldPos=%
ld lpck->dwDataOffset = %l
d
\n
"
,
dwOldPos
,
lpck
->
dwDataOffset
);
TRACE
(
"dwOldPos=%
d lpck->dwDataOffset = %
d
\n
"
,
dwOldPos
,
lpck
->
dwDataOffset
);
dwNewSize
=
dwOldPos
-
lpck
->
dwDataOffset
;
if
(
dwNewSize
!=
lpck
->
cksize
)
{
TRACE
(
"Nope: lpck->cksize=%
ld dwNewSize=%l
d
\n
"
,
lpck
->
cksize
,
dwNewSize
);
TRACE
(
"Nope: lpck->cksize=%
d dwNewSize=%
d
\n
"
,
lpck
->
cksize
,
dwNewSize
);
lpck
->
cksize
=
dwNewSize
;
/* pad odd size with 0 */
...
...
@@ -1274,7 +1274,7 @@ MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO* lpck, UINT uFlags)
TRACE
(
"(%p, %p, %04X);
\n
"
,
hmmio
,
lpck
,
uFlags
);
dwOldPos
=
mmioSeek
(
hmmio
,
0
,
SEEK_CUR
);
TRACE
(
"dwOldPos=%
l
d
\n
"
,
dwOldPos
);
TRACE
(
"dwOldPos=%d
\n
"
,
dwOldPos
);
if
(
uFlags
==
MMIO_CREATELIST
)
lpck
->
ckid
=
FOURCC_LIST
;
...
...
@@ -1291,7 +1291,7 @@ MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO* lpck, UINT uFlags)
lpck
->
dwFlags
=
MMIO_DIRTY
;
ix
=
mmioWrite
(
hmmio
,
(
LPSTR
)
lpck
,
size
);
TRACE
(
"after mmioWrite ix = %
ld req = %ld, errno = %d
\n
"
,
ix
,
size
,
errno
);
TRACE
(
"after mmioWrite ix = %
d req = %d, errno = %d
\n
"
,
ix
,
size
,
errno
);
if
(
ix
<
size
)
{
mmioSeek
(
hmmio
,
dwOldPos
,
SEEK_SET
);
WARN
(
"return CannotWrite
\n
"
);
...
...
@@ -1311,7 +1311,7 @@ MMRESULT WINAPI mmioRenameA(LPCSTR szFileName, LPCSTR szNewFileName,
struct
IOProcList
tmp
;
FOURCC
fcc
;
TRACE
(
"('%s', '%s', %p, %08
l
X);
\n
"
,
TRACE
(
"('%s', '%s', %p, %08X);
\n
"
,
debugstr_a
(
szFileName
),
debugstr_a
(
szNewFileName
),
lpmmioinfo
,
dwFlags
);
/* If both params are NULL, then parse the file name */
...
...
dlls/winmm/mmsystem.c
View file @
2f540b86
...
...
@@ -66,7 +66,7 @@ static LRESULT MMIO_Callback16(SEGPTR, LPMMIOINFO, UINT, LPARAM, LPARAM
BOOL
WINAPI
MMSYSTEM_LibMain
(
DWORD
fdwReason
,
HINSTANCE
hinstDLL
,
WORD
ds
,
WORD
wHeapSize
,
DWORD
dwReserved1
,
WORD
wReserved2
)
{
TRACE
(
"%p 0x%
l
x
\n
"
,
hinstDLL
,
fdwReason
);
TRACE
(
"%p 0x%x
\n
"
,
hinstDLL
,
fdwReason
);
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
...
...
@@ -284,7 +284,7 @@ UINT16 WINAPI mixerGetControlDetails16(HMIXEROBJ16 hmix,
DWORD
ret
=
MMSYSERR_NOTENABLED
;
SEGPTR
sppaDetails
;
TRACE
(
"(%04x, %p, %08
l
x)
\n
"
,
hmix
,
lpmcd
,
fdwDetails
);
TRACE
(
"(%04x, %p, %08x)
\n
"
,
hmix
,
lpmcd
,
fdwDetails
);
if
(
lpmcd
==
NULL
||
lpmcd
->
cbStruct
!=
sizeof
(
*
lpmcd
))
return
MMSYSERR_INVALPARAM
;
...
...
@@ -310,7 +310,7 @@ UINT16 WINAPI mixerGetLineControls16(HMIXEROBJ16 hmix,
unsigned
int
i
;
LPMIXERCONTROL16
lpmc16
;
TRACE
(
"(%04x, %p, %08
l
x)
\n
"
,
hmix
,
lpmlc16
,
fdwControls
);
TRACE
(
"(%04x, %p, %08x)
\n
"
,
hmix
,
lpmlc16
,
fdwControls
);
if
(
lpmlc16
==
NULL
||
lpmlc16
->
cbStruct
!=
sizeof
(
*
lpmlc16
)
||
lpmlc16
->
cbmxctrl
!=
sizeof
(
MIXERCONTROL16
))
...
...
@@ -366,7 +366,7 @@ UINT16 WINAPI mixerGetLineInfo16(HMIXEROBJ16 hmix, LPMIXERLINE16 lpmli16,
MIXERLINEA
mliA
;
UINT
ret
;
TRACE
(
"(%04x, %p, %08
l
x)
\n
"
,
hmix
,
lpmli16
,
fdwInfo
);
TRACE
(
"(%04x, %p, %08x)
\n
"
,
hmix
,
lpmli16
,
fdwInfo
);
if
(
lpmli16
==
NULL
||
lpmli16
->
cbStruct
!=
sizeof
(
*
lpmli16
))
return
MMSYSERR_INVALPARAM
;
...
...
@@ -394,7 +394,7 @@ UINT16 WINAPI mixerGetLineInfo16(HMIXEROBJ16 hmix, LPMIXERLINE16 lpmli16,
strcpy
(
mliA
.
Target
.
szPname
,
lpmli16
->
Target
.
szPname
);
break
;
default:
FIXME
(
"Unsupported fdwControls=0x%08
l
x
\n
"
,
fdwInfo
);
FIXME
(
"Unsupported fdwControls=0x%08x
\n
"
,
fdwInfo
);
}
ret
=
mixerGetLineInfoA
(
HMIXEROBJ_32
(
hmix
),
&
mliA
,
fdwInfo
);
...
...
@@ -427,7 +427,7 @@ UINT16 WINAPI mixerSetControlDetails16(HMIXEROBJ16 hmix,
LPMIXERCONTROLDETAILS16
lpmcd
,
DWORD
fdwDetails
)
{
TRACE
(
"(%04x, %p, %08
l
x)
\n
"
,
hmix
,
lpmcd
,
fdwDetails
);
TRACE
(
"(%04x, %p, %08x)
\n
"
,
hmix
,
lpmcd
,
fdwDetails
);
return
MMSYSERR_NOTENABLED
;
}
...
...
@@ -498,7 +498,7 @@ UINT16 WINAPI auxSetVolume16(UINT16 uDeviceID, DWORD dwVolume)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%04X, %
l
u) !
\n
"
,
uDeviceID
,
dwVolume
);
TRACE
(
"(%04X, %u) !
\n
"
,
uDeviceID
,
dwVolume
);
if
((
wmld
=
MMDRV_Get
((
HANDLE
)(
ULONG_PTR
)
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -512,7 +512,7 @@ DWORD WINAPI auxOutMessage16(UINT16 uDeviceID, UINT16 uMessage, DWORD dw1, DWORD
{
LPWINE_MLD
wmld
;
TRACE
(
"(%04X, %04X, %08
lX, %08l
X)
\n
"
,
uDeviceID
,
uMessage
,
dw1
,
dw2
);
TRACE
(
"(%04X, %04X, %08
X, %08
X)
\n
"
,
uDeviceID
,
uMessage
,
dw1
,
dw2
);
switch
(
uMessage
)
{
case
AUXDM_GETNUMDEVS
:
...
...
@@ -524,7 +524,7 @@ DWORD WINAPI auxOutMessage16(UINT16 uDeviceID, UINT16 uMessage, DWORD dw1, DWORD
case
AUXDM_GETDEVCAPS
:
return
auxGetDevCaps16
(
uDeviceID
,
MapSL
(
dw1
),
dw2
);
default:
TRACE
(
"(%04x, %04x, %08
lx, %08l
x): unhandled message
\n
"
,
TRACE
(
"(%04x, %04x, %08
x, %08
x): unhandled message
\n
"
,
uDeviceID
,
uMessage
,
dw1
,
dw2
);
break
;
}
...
...
@@ -580,12 +580,12 @@ DWORD WINAPI mciSendCommand16(UINT16 wDevID, UINT16 wMsg, DWORD dwParam1, DWORD
{
DWORD
dwRet
;
TRACE
(
"(%04X, %s, %08
lX, %08l
X)
\n
"
,
TRACE
(
"(%04X, %s, %08
X, %08
X)
\n
"
,
wDevID
,
MCI_MessageToString
(
wMsg
),
dwParam1
,
dwParam2
);
dwRet
=
MCI_SendCommand
(
wDevID
,
wMsg
,
dwParam1
,
dwParam2
,
FALSE
);
dwRet
=
MCI_CleanUp
(
dwRet
,
wMsg
,
(
DWORD
)
MapSL
(
dwParam2
));
TRACE
(
"=> %
l
d
\n
"
,
dwRet
);
TRACE
(
"=> %d
\n
"
,
dwRet
);
return
dwRet
;
}
...
...
@@ -606,7 +606,7 @@ BOOL16 WINAPI mciSetYieldProc16(UINT16 uDeviceID, YIELDPROC16 fpYieldProc, DWORD
{
LPWINE_MCIDRIVER
wmd
;
TRACE
(
"(%u, %p, %08
l
x)
\n
"
,
uDeviceID
,
fpYieldProc
,
dwYieldData
);
TRACE
(
"(%u, %p, %08x)
\n
"
,
uDeviceID
,
fpYieldProc
,
dwYieldData
);
if
(
!
(
wmd
=
MCI_GetDriver
(
uDeviceID
)))
{
WARN
(
"Bad uDeviceID
\n
"
);
...
...
@@ -625,7 +625,7 @@ BOOL16 WINAPI mciSetYieldProc16(UINT16 uDeviceID, YIELDPROC16 fpYieldProc, DWORD
*/
UINT16
WINAPI
mciGetDeviceIDFromElementID16
(
DWORD
dwElementID
,
LPCSTR
lpstrType
)
{
FIXME
(
"(%
l
u, %s) stub
\n
"
,
dwElementID
,
lpstrType
);
FIXME
(
"(%u, %s) stub
\n
"
,
dwElementID
,
lpstrType
);
return
0
;
}
...
...
@@ -769,7 +769,7 @@ UINT16 WINAPI midiOutPrepareHeader16(HMIDIOUT16 hMidiOut, /* [in] */
{
LPWINE_MLD
wmld
;
TRACE
(
"(%04X, %08
l
x, %d)
\n
"
,
hMidiOut
,
lpsegMidiOutHdr
,
uSize
);
TRACE
(
"(%04X, %08x, %d)
\n
"
,
hMidiOut
,
lpsegMidiOutHdr
,
uSize
);
if
((
wmld
=
MMDRV_Get
(
HMIDIOUT_32
(
hMidiOut
),
MMDRV_MIDIOUT
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -787,7 +787,7 @@ UINT16 WINAPI midiOutUnprepareHeader16(HMIDIOUT16 hMidiOut, /* [in] */
LPWINE_MLD
wmld
;
LPMIDIHDR16
lpMidiOutHdr
=
MapSL
(
lpsegMidiOutHdr
);
TRACE
(
"(%04X, %08
l
x, %d)
\n
"
,
hMidiOut
,
lpsegMidiOutHdr
,
uSize
);
TRACE
(
"(%04X, %08x, %d)
\n
"
,
hMidiOut
,
lpsegMidiOutHdr
,
uSize
);
if
(
!
(
lpMidiOutHdr
->
dwFlags
&
MHDR_PREPARED
))
{
return
MMSYSERR_NOERROR
;
...
...
@@ -892,7 +892,7 @@ DWORD WINAPI midiOutMessage16(HMIDIOUT16 hMidiOut, UINT16 uMessage,
{
LPWINE_MLD
wmld
;
TRACE
(
"(%04X, %04X, %08
lX, %08l
X)
\n
"
,
hMidiOut
,
uMessage
,
dwParam1
,
dwParam2
);
TRACE
(
"(%04X, %04X, %08
X, %08
X)
\n
"
,
hMidiOut
,
uMessage
,
dwParam1
,
dwParam2
);
if
((
wmld
=
MMDRV_Get
(
HMIDIOUT_32
(
hMidiOut
),
MMDRV_MIDIOUT
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -980,7 +980,7 @@ UINT16 WINAPI midiInPrepareHeader16(HMIDIIN16 hMidiIn, /* [in] */
{
LPWINE_MLD
wmld
;
TRACE
(
"(%04X, %08
l
x, %d)
\n
"
,
hMidiIn
,
lpsegMidiInHdr
,
uSize
);
TRACE
(
"(%04X, %08x, %d)
\n
"
,
hMidiIn
,
lpsegMidiInHdr
,
uSize
);
if
((
wmld
=
MMDRV_Get
(
HMIDIIN_32
(
hMidiIn
),
MMDRV_MIDIIN
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -998,7 +998,7 @@ UINT16 WINAPI midiInUnprepareHeader16(HMIDIIN16 hMidiIn, /* [in] */
LPWINE_MLD
wmld
;
LPMIDIHDR16
lpMidiInHdr
=
MapSL
(
lpsegMidiInHdr
);
TRACE
(
"(%04X, %08
l
x, %d)
\n
"
,
hMidiIn
,
lpsegMidiInHdr
,
uSize
);
TRACE
(
"(%04X, %08x, %d)
\n
"
,
hMidiIn
,
lpsegMidiInHdr
,
uSize
);
if
(
!
(
lpMidiInHdr
->
dwFlags
&
MHDR_PREPARED
))
{
return
MMSYSERR_NOERROR
;
...
...
@@ -1078,7 +1078,7 @@ DWORD WINAPI midiInMessage16(HMIDIIN16 hMidiIn, UINT16 uMessage,
{
LPWINE_MLD
wmld
;
TRACE
(
"(%04X, %04X, %08
lX, %08l
X)
\n
"
,
hMidiIn
,
uMessage
,
dwParam1
,
dwParam2
);
TRACE
(
"(%04X, %04X, %08
X, %08
X)
\n
"
,
hMidiIn
,
uMessage
,
dwParam1
,
dwParam2
);
switch
(
uMessage
)
{
case
MIDM_OPEN
:
...
...
@@ -1283,7 +1283,7 @@ UINT16 WINAPI waveOutPrepareHeader16(HWAVEOUT16 hWaveOut, /* [in] */
LPWINE_MLD
wmld
;
LPWAVEHDR
lpWaveOutHdr
=
MapSL
(
lpsegWaveOutHdr
);
TRACE
(
"(%04X, %08
l
x, %u);
\n
"
,
hWaveOut
,
lpsegWaveOutHdr
,
uSize
);
TRACE
(
"(%04X, %08x, %u);
\n
"
,
hWaveOut
,
lpsegWaveOutHdr
,
uSize
);
if
(
lpWaveOutHdr
==
NULL
)
return
MMSYSERR_INVALPARAM
;
...
...
@@ -1303,7 +1303,7 @@ UINT16 WINAPI waveOutUnprepareHeader16(HWAVEOUT16 hWaveOut, /* [in] */
LPWINE_MLD
wmld
;
LPWAVEHDR
lpWaveOutHdr
=
MapSL
(
lpsegWaveOutHdr
);
TRACE
(
"(%04X, %08
l
x, %u);
\n
"
,
hWaveOut
,
lpsegWaveOutHdr
,
uSize
);
TRACE
(
"(%04X, %08x, %u);
\n
"
,
hWaveOut
,
lpsegWaveOutHdr
,
uSize
);
if
(
!
(
lpWaveOutHdr
->
dwFlags
&
WHDR_PREPARED
))
{
return
MMSYSERR_NOERROR
;
...
...
@@ -1477,7 +1477,7 @@ DWORD WINAPI waveOutMessage16(HWAVEOUT16 hWaveOut, UINT16 uMessage,
{
LPWINE_MLD
wmld
;
TRACE
(
"(%04x, %u, %
ld, %l
d)
\n
"
,
hWaveOut
,
uMessage
,
dwParam1
,
dwParam2
);
TRACE
(
"(%04x, %u, %
d, %
d)
\n
"
,
hWaveOut
,
uMessage
,
dwParam1
,
dwParam2
);
if
((
wmld
=
MMDRV_Get
(
HWAVEOUT_32
(
hWaveOut
),
MMDRV_WAVEOUT
,
FALSE
))
==
NULL
)
{
if
((
wmld
=
MMDRV_Get
(
HWAVEOUT_32
(
hWaveOut
),
MMDRV_WAVEOUT
,
TRUE
))
!=
NULL
)
{
...
...
@@ -1597,7 +1597,7 @@ UINT16 WINAPI waveInUnprepareHeader16(HWAVEIN16 hWaveIn, /* [in] */
LPWINE_MLD
wmld
;
LPWAVEHDR
lpWaveInHdr
=
MapSL
(
lpsegWaveInHdr
);
TRACE
(
"(%04X, %08
l
x, %u);
\n
"
,
hWaveIn
,
lpsegWaveInHdr
,
uSize
);
TRACE
(
"(%04X, %08x, %u);
\n
"
,
hWaveIn
,
lpsegWaveInHdr
,
uSize
);
if
(
lpWaveInHdr
==
NULL
)
return
MMSYSERR_INVALPARAM
;
...
...
@@ -1712,7 +1712,7 @@ DWORD WINAPI waveInMessage16(HWAVEIN16 hWaveIn, UINT16 uMessage,
{
LPWINE_MLD
wmld
;
TRACE
(
"(%04x, %u, %
ld, %l
d)
\n
"
,
hWaveIn
,
uMessage
,
dwParam1
,
dwParam2
);
TRACE
(
"(%04x, %u, %
d, %
d)
\n
"
,
hWaveIn
,
uMessage
,
dwParam1
,
dwParam2
);
if
((
wmld
=
MMDRV_Get
(
HWAVEIN_32
(
hWaveIn
),
MMDRV_WAVEIN
,
FALSE
))
==
NULL
)
{
if
((
wmld
=
MMDRV_Get
(
HWAVEIN_32
(
hWaveIn
),
MMDRV_WAVEIN
,
TRUE
))
!=
NULL
)
{
...
...
@@ -1751,7 +1751,7 @@ HINSTANCE16 WINAPI mmTaskCreate16(SEGPTR spProc, HINSTANCE16 *lphMmTask, DWORD d
DWORD
showCmd
=
0x40002
;
LOADPARAMS16
lp
;
TRACE
(
"(%08
lx, %p, %08l
x);
\n
"
,
spProc
,
lphMmTask
,
dwPmt
);
TRACE
(
"(%08
x, %p, %08
x);
\n
"
,
spProc
,
lphMmTask
,
dwPmt
);
/* This to work requires NE modules to be started with a binary command line
* which is not currently the case. A patch exists but has never been committed.
* A workaround would be to integrate code for mmtask.tsk into Wine, but
...
...
@@ -1894,7 +1894,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE16 lpHndl, DWORD
HANDLE16
hndl
;
LRESULT
ret
;
TRACE
(
"(%p, %p, %08
lx, %08l
x)!
\n
"
,
fpThreadAddr
,
lpHndl
,
dwPmt
,
dwFlags
);
TRACE
(
"(%p, %p, %08
x, %08
x)!
\n
"
,
fpThreadAddr
,
lpHndl
,
dwPmt
,
dwFlags
);
hndl
=
GlobalAlloc16
(
sizeof
(
WINE_MMTHREAD
),
GMEM_SHARE
|
GMEM_ZEROINIT
);
...
...
@@ -1946,7 +1946,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE16 lpHndl, DWORD
ret
=
2
;
}
else
{
SetThreadPriority
(
lpMMThd
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
TRACE
(
"Got a nice thread hndl=%p id=0x%08
l
x
\n
"
,
lpMMThd
->
hThread
,
lpMMThd
->
dwThreadID
);
TRACE
(
"Got a nice thread hndl=%p id=0x%08x
\n
"
,
lpMMThd
->
hThread
,
lpMMThd
->
dwThreadID
);
ret
=
0
;
}
}
else
{
...
...
@@ -1955,7 +1955,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE16 lpHndl, DWORD
*/
FARPROC16
fp
=
GetProcAddress16
(
GetModuleHandle16
(
"MMSYSTEM"
),
(
LPCSTR
)
2047
);
TRACE
(
"farproc seg=0x%
08lx lin=%p
\n
"
,
(
DWORD
)
fp
,
MapSL
((
SEGPTR
)
fp
));
TRACE
(
"farproc seg=0x%
p lin=%p
\n
"
,
fp
,
MapSL
((
SEGPTR
)
fp
));
ret
=
(
fp
==
0
)
?
2
:
mmTaskCreate16
((
DWORD
)
fp
,
0
,
hndl
);
}
...
...
@@ -2032,7 +2032,7 @@ static void MMSYSTEM_ThreadBlock(WINE_MMTHREAD* lpMMThd)
}
break
;
default:
WARN
(
"S2.x unsupported ret val 0x%08
l
x
\n
"
,
ret
);
WARN
(
"S2.x unsupported ret val 0x%08x
\n
"
,
ret
);
}
TRACE
(
"S3
\n
"
);
}
...
...
@@ -2493,7 +2493,7 @@ LRESULT WINAPI DrvDefDriverProc16(DWORD dwDriverID, HDRVR16 hDrv, WORD wMsg,
LRESULT
WINAPI
DriverProc16
(
DWORD
dwDevID
,
HDRVR16
hDrv
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
TRACE
(
"dwDevID=%08
lx hDrv=%04x wMsg=%04x dwParam1=%08lx dwParam2=%08l
x
\n
"
,
TRACE
(
"dwDevID=%08
x hDrv=%04x wMsg=%04x dwParam1=%08x dwParam2=%08
x
\n
"
,
dwDevID
,
hDrv
,
wMsg
,
dwParam1
,
dwParam2
);
return
DrvDefDriverProc16
(
dwDevID
,
hDrv
,
wMsg
,
dwParam1
,
dwParam2
);
...
...
@@ -2541,7 +2541,7 @@ MMRESULT16 WINAPI timeGetSystemTime16(LPMMTIME16 lpTime, UINT16 wSize)
lpTime
->
wType
=
TIME_MS
;
lpTime
->
u
.
ms
=
GetTickCount
();
TRACE
(
"=> %
l
u
\n
"
,
lpTime
->
u
.
ms
);
TRACE
(
"=> %u
\n
"
,
lpTime
->
u
.
ms
);
}
return
0
;
...
...
@@ -2701,7 +2701,7 @@ static LRESULT MMIO_Map32To16(DWORD wMsg, LPARAM* lp1, LPARAM* lp2)
break
;
default:
if
(
wMsg
<
MMIOM_USER
)
TRACE
(
"Not a mappable message (%
l
d)
\n
"
,
wMsg
);
TRACE
(
"Not a mappable message (%d)
\n
"
,
wMsg
);
}
return
MMSYSERR_NOERROR
;
}
...
...
@@ -2729,7 +2729,7 @@ static LRESULT MMIO_UnMap32To16(DWORD wMsg, LPARAM lParam1, LPARAM lParam2,
break
;
default:
if
(
wMsg
<
MMIOM_USER
)
TRACE
(
"Not a mappable message (%
l
d)
\n
"
,
wMsg
);
TRACE
(
"Not a mappable message (%d)
\n
"
,
wMsg
);
}
return
MMSYSERR_NOERROR
;
}
...
...
dlls/winmm/playsound.c
View file @
2f540b86
...
...
@@ -155,7 +155,7 @@ static void CALLBACK PlaySound_Callback(HWAVEOUT hwo, UINT uMsg,
break
;
case
WOM_DONE
:
InterlockedIncrement
(
&
s
->
dwEventCount
);
TRACE
(
"Returning waveHdr=%
l
x
\n
"
,
dwParam1
);
TRACE
(
"Returning waveHdr=%x
\n
"
,
dwParam1
);
SetEvent
(
s
->
hEvent
);
break
;
default:
...
...
@@ -317,7 +317,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
if
(
mmioDescend
(
hmmio
,
&
ckMainRIFF
,
NULL
,
0
))
goto
errCleanUp
;
TRACE
(
"ParentChunk ckid=%.4s fccType=%.4s cksize=%08
l
X
\n
"
,
TRACE
(
"ParentChunk ckid=%.4s fccType=%.4s cksize=%08X
\n
"
,
(
LPSTR
)
&
ckMainRIFF
.
ckid
,
(
LPSTR
)
&
ckMainRIFF
.
fccType
,
ckMainRIFF
.
cksize
);
if
((
ckMainRIFF
.
ckid
!=
FOURCC_RIFF
)
||
...
...
@@ -328,7 +328,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
if
(
mmioDescend
(
hmmio
,
&
mmckInfo
,
&
ckMainRIFF
,
MMIO_FINDCHUNK
))
goto
errCleanUp
;
TRACE
(
"Chunk Found ckid=%.4s fccType=%08
lx cksize=%08l
X
\n
"
,
TRACE
(
"Chunk Found ckid=%.4s fccType=%08
x cksize=%08
X
\n
"
,
(
LPSTR
)
&
mmckInfo
.
ckid
,
mmckInfo
.
fccType
,
mmckInfo
.
cksize
);
lpWaveFormat
=
HeapAlloc
(
GetProcessHeap
(),
0
,
mmckInfo
.
cksize
);
...
...
@@ -337,8 +337,8 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
TRACE
(
"wFormatTag=%04X !
\n
"
,
lpWaveFormat
->
wFormatTag
);
TRACE
(
"nChannels=%d
\n
"
,
lpWaveFormat
->
nChannels
);
TRACE
(
"nSamplesPerSec=%
l
d
\n
"
,
lpWaveFormat
->
nSamplesPerSec
);
TRACE
(
"nAvgBytesPerSec=%
l
d
\n
"
,
lpWaveFormat
->
nAvgBytesPerSec
);
TRACE
(
"nSamplesPerSec=%d
\n
"
,
lpWaveFormat
->
nSamplesPerSec
);
TRACE
(
"nAvgBytesPerSec=%d
\n
"
,
lpWaveFormat
->
nAvgBytesPerSec
);
TRACE
(
"nBlockAlign=%d
\n
"
,
lpWaveFormat
->
nBlockAlign
);
TRACE
(
"wBitsPerSample=%u !
\n
"
,
lpWaveFormat
->
wBitsPerSample
);
...
...
@@ -349,7 +349,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
if
(
mmioDescend
(
hmmio
,
&
mmckInfo
,
&
ckMainRIFF
,
MMIO_FINDCHUNK
))
goto
errCleanUp
;
TRACE
(
"Chunk Found ckid=%.4s fccType=%08
lx cksize=%08l
X
\n
"
,
TRACE
(
"Chunk Found ckid=%.4s fccType=%08
x cksize=%08
X
\n
"
,
(
LPSTR
)
&
mmckInfo
.
ckid
,
mmckInfo
.
fccType
,
mmckInfo
.
cksize
);
s
.
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
...
...
@@ -424,7 +424,7 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo
{
WINE_PLAYSOUND
*
wps
=
NULL
;
TRACE
(
"pszSound='%p' hmod=%p fdwSound=%08
l
X
\n
"
,
TRACE
(
"pszSound='%p' hmod=%p fdwSound=%08X
\n
"
,
pszSound
,
hmod
,
fdwSound
);
/* FIXME? I see no difference between SND_NOWAIT and SND_NOSTOP !
...
...
dlls/winmm/sound16.c
View file @
2f540b86
...
...
@@ -97,7 +97,7 @@ INT16 WINAPI SetSoundNoise16(INT16 nSource, INT16 nDuration)
*/
INT16
WINAPI
SetVoiceSound16
(
INT16
nVoice
,
DWORD
lFrequency
,
INT16
nDuration
)
{
FIXME
(
"(%d, %
l
d, %d): stub
\n
"
,
nVoice
,
lFrequency
,
nDuration
);
FIXME
(
"(%d, %d, %d): stub
\n
"
,
nVoice
,
lFrequency
,
nDuration
);
return
0
;
}
...
...
@@ -178,7 +178,3 @@ void WINAPI DoBeep16(void)
{
FIXME
(
"(void): stub!
\n
"
);
}
dlls/winmm/time.c
View file @
2f540b86
...
...
@@ -80,7 +80,7 @@ static BOOL TIME_TimeToDie = TRUE;
static
void
TIME_TriggerCallBack
(
LPWINE_TIMERENTRY
lpTimer
)
{
TRACE
(
"%04
lx:CallBack => lpFunc=%p wTimerID=%04X dwUser=%08lX dwTriggerTime %ld(delta %l
d)
\n
"
,
TRACE
(
"%04
x:CallBack => lpFunc=%p wTimerID=%04X dwUser=%08X dwTriggerTime %d(delta %
d)
\n
"
,
GetCurrentThreadId
(),
lpTimer
->
lpFunc
,
lpTimer
->
wTimerID
,
lpTimer
->
dwUser
,
lpTimer
->
dwTriggerTime
,
GetTickCount
()
-
lpTimer
->
dwTriggerTime
);
...
...
@@ -247,7 +247,7 @@ static DWORD CALLBACK TIME_MMSysTimeThread(LPVOID arg)
rc
=
WaitForSingleObject
(
TIME_hWakeEvent
,
sleep_time
);
if
(
rc
!=
WAIT_TIMEOUT
&&
rc
!=
WAIT_OBJECT_0
)
{
FIXME
(
"Unexpected error %
ld(%l
d) in timer thread
\n
"
,
rc
,
GetLastError
());
FIXME
(
"Unexpected error %
d(%
d) in timer thread
\n
"
,
rc
,
GetLastError
());
break
;
}
}
...
...
@@ -314,7 +314,7 @@ WORD TIME_SetEventInternal(UINT wDelay, UINT wResol,
LPWINE_TIMERENTRY
lpNewTimer
;
LPWINE_TIMERENTRY
lpTimer
;
TRACE
(
"(%u, %u, %p, %08
l
X, %04X);
\n
"
,
wDelay
,
wResol
,
lpFunc
,
dwUser
,
wFlags
);
TRACE
(
"(%u, %u, %p, %08X, %04X);
\n
"
,
wDelay
,
wResol
,
lpFunc
,
dwUser
,
wFlags
);
if
(
wDelay
<
MMSYSTIME_MININTERVAL
||
wDelay
>
MMSYSTIME_MAXINTERVAL
)
return
0
;
...
...
dlls/winmm/winemm.h
View file @
2f540b86
...
...
@@ -99,8 +99,8 @@ typedef struct tagWINE_MLD {
* opendesc.dwInstance which is client (callback) related */
WORD
bFrom32
;
WORD
dwFlags
;
DWORD
dwCallback
;
DWORD
dwClientInstance
;
DWORD
_PTR
dwCallback
;
DWORD
_PTR
dwClientInstance
;
}
WINE_MLD
,
*
LPWINE_MLD
;
typedef
struct
{
...
...
@@ -217,8 +217,8 @@ typedef struct tagWINE_MM_IDATA {
/* function prototypes */
typedef
LONG
(
*
MCIPROC
)(
DWORD
,
HDRVR
,
DWORD
,
DWORD
,
DWORD
);
typedef
WINMM_MapType
(
*
MMDRV_MAPFUNC
)(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
);
typedef
WINMM_MapType
(
*
MMDRV_UNMAPFUNC
)(
UINT
wMsg
,
LPDWORD
lpdwUser
,
LPDWORD
lpParam1
,
LPDWORD
lpParam2
,
MMRESULT
ret
);
typedef
WINMM_MapType
(
*
MMDRV_MAPFUNC
)(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
);
typedef
WINMM_MapType
(
*
MMDRV_UNMAPFUNC
)(
UINT
wMsg
,
LPDWORD
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
,
MMRESULT
ret
);
LPWINE_DRIVER
DRIVER_FindFromHDrvr
(
HDRVR
hDrvr
);
BOOL
DRIVER_GetLibName
(
LPCWSTR
keyName
,
LPCWSTR
sectName
,
LPWSTR
buf
,
int
sz
);
...
...
@@ -229,7 +229,7 @@ BOOL MMDRV_Init(void);
void
MMDRV_Exit
(
void
);
UINT
MMDRV_GetNum
(
UINT
);
LPWINE_MLD
MMDRV_Alloc
(
UINT
size
,
UINT
type
,
LPHANDLE
hndl
,
DWORD
*
dwFlags
,
DWORD
*
dwCallback
,
DWORD
*
dwInstance
,
BOOL
bFrom32
);
DWORD
_PTR
*
dwCallback
,
DWORD_PTR
*
dwInstance
,
BOOL
bFrom32
);
void
MMDRV_Free
(
HANDLE
hndl
,
LPWINE_MLD
mld
);
DWORD
MMDRV_Open
(
LPWINE_MLD
mld
,
UINT
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
);
DWORD
MMDRV_Close
(
LPWINE_MLD
mld
,
UINT
wMsg
);
...
...
@@ -247,7 +247,7 @@ DWORD MCI_WriteString(LPWSTR lpDstStr, DWORD dstSize, LPCWSTR lpSrcStr);
const
char
*
MCI_MessageToString
(
UINT
wMsg
);
UINT
WINAPI
MCI_DefYieldProc
(
MCIDEVICEID
wDevID
,
DWORD
data
);
LRESULT
MCI_CleanUp
(
LRESULT
dwRet
,
UINT
wMsg
,
DWORD
dwParam2
);
DWORD
MCI_SendCommand
(
UINT
wDevID
,
UINT16
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
,
BOOL
bFrom32
);
DWORD
MCI_SendCommand
(
UINT
wDevID
,
UINT16
wMsg
,
DWORD
_PTR
dwParam1
,
DWORD_PTR
dwParam2
,
BOOL
bFrom32
);
DWORD
MCI_SendCommandFrom32
(
UINT
wDevID
,
UINT16
wMsg
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
);
DWORD
MCI_SendCommandFrom16
(
UINT
wDevID
,
UINT16
wMsg
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
);
UINT
MCI_SetCommandTable
(
void
*
table
,
UINT
uDevType
);
...
...
dlls/winmm/winmm.c
View file @
2f540b86
...
...
@@ -172,7 +172,7 @@ const char* WINMM_ErrorToString(MMRESULT error)
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
fImpLoad
)
{
TRACE
(
"%p 0x%
l
x %p
\n
"
,
hInstDLL
,
fdwReason
,
fImpLoad
);
TRACE
(
"%p 0x%x %p
\n
"
,
hInstDLL
,
fdwReason
,
fImpLoad
);
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
...
...
@@ -313,7 +313,7 @@ UINT MIXER_Open(LPHMIXER lphMix, UINT uDeviceID, DWORD_PTR dwCallback,
DWORD
dwRet
=
0
;
MIXEROPENDESC
mod
;
TRACE
(
"(%p, %d, %08lx, %08lx, %08
l
x)
\n
"
,
TRACE
(
"(%p, %d, %08lx, %08lx, %08x)
\n
"
,
lphMix
,
uDeviceID
,
dwCallback
,
dwInstance
,
fdwOpen
);
wmld
=
MMDRV_Alloc
(
sizeof
(
WINE_MIXER
),
MMDRV_MIXER
,
&
hMix
,
&
fdwOpen
,
...
...
@@ -331,7 +331,7 @@ UINT MIXER_Open(LPHMIXER lphMix, UINT uDeviceID, DWORD_PTR dwCallback,
hMix
=
0
;
}
if
(
lphMix
)
*
lphMix
=
hMix
;
TRACE
(
"=> %
l
d hMixer=%p
\n
"
,
dwRet
,
hMix
);
TRACE
(
"=> %d hMixer=%p
\n
"
,
dwRet
,
hMix
);
return
dwRet
;
}
...
...
@@ -371,7 +371,7 @@ UINT WINAPI mixerGetID(HMIXEROBJ hmix, LPUINT lpid, DWORD fdwID)
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p %p %08
l
x)
\n
"
,
hmix
,
lpid
,
fdwID
);
TRACE
(
"(%p %p %08x)
\n
"
,
hmix
,
lpid
,
fdwID
);
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwID
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
...
...
@@ -391,7 +391,7 @@ UINT WINAPI mixerGetControlDetailsW(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdW
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p, %p, %08
l
x)
\n
"
,
hmix
,
lpmcdW
,
fdwDetails
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hmix
,
lpmcdW
,
fdwDetails
);
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwDetails
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
...
...
@@ -411,7 +411,7 @@ UINT WINAPI mixerGetControlDetailsA(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdA
{
DWORD
ret
=
MMSYSERR_NOTENABLED
;
TRACE
(
"(%p, %p, %08
l
x)
\n
"
,
hmix
,
lpmcdA
,
fdwDetails
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hmix
,
lpmcdA
,
fdwDetails
);
if
(
lpmcdA
==
NULL
||
lpmcdA
->
cbStruct
!=
sizeof
(
*
lpmcdA
))
return
MMSYSERR_INVALPARAM
;
...
...
@@ -456,7 +456,7 @@ UINT WINAPI mixerGetControlDetailsA(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdA
}
break
;
default:
ERR
(
"Unsupported fdwDetails=0x%08
l
x
\n
"
,
fdwDetails
);
ERR
(
"Unsupported fdwDetails=0x%08x
\n
"
,
fdwDetails
);
}
return
ret
;
...
...
@@ -472,7 +472,7 @@ UINT WINAPI mixerGetLineControlsA(HMIXEROBJ hmix, LPMIXERLINECONTROLSA lpmlcA,
DWORD
ret
;
unsigned
int
i
;
TRACE
(
"(%p, %p, %08
l
x)
\n
"
,
hmix
,
lpmlcA
,
fdwControls
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hmix
,
lpmlcA
,
fdwControls
);
if
(
lpmlcA
==
NULL
||
lpmlcA
->
cbStruct
!=
sizeof
(
*
lpmlcA
)
||
lpmlcA
->
cbmxctrl
!=
sizeof
(
MIXERCONTROLA
))
...
...
@@ -540,7 +540,7 @@ UINT WINAPI mixerGetLineControlsW(HMIXEROBJ hmix, LPMIXERLINECONTROLSW lpmlcW,
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p, %p, %08
l
x)
\n
"
,
hmix
,
lpmlcW
,
fdwControls
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hmix
,
lpmlcW
,
fdwControls
);
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwControls
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
...
...
@@ -560,7 +560,7 @@ UINT WINAPI mixerGetLineInfoW(HMIXEROBJ hmix, LPMIXERLINEW lpmliW, DWORD fdwInfo
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p, %p, %08
l
x)
\n
"
,
hmix
,
lpmliW
,
fdwInfo
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hmix
,
lpmliW
,
fdwInfo
);
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwInfo
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
...
...
@@ -578,7 +578,7 @@ UINT WINAPI mixerGetLineInfoA(HMIXEROBJ hmix, LPMIXERLINEA lpmliA,
MIXERLINEW
mliW
;
UINT
ret
;
TRACE
(
"(%p, %p, %08
l
x)
\n
"
,
hmix
,
lpmliA
,
fdwInfo
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hmix
,
lpmliA
,
fdwInfo
);
if
(
lpmliA
==
NULL
||
lpmliA
->
cbStruct
!=
sizeof
(
*
lpmliA
))
return
MMSYSERR_INVALPARAM
;
...
...
@@ -606,7 +606,7 @@ UINT WINAPI mixerGetLineInfoA(HMIXEROBJ hmix, LPMIXERLINEA lpmliA,
MultiByteToWideChar
(
CP_ACP
,
0
,
lpmliA
->
Target
.
szPname
,
-
1
,
mliW
.
Target
.
szPname
,
sizeof
(
mliW
.
Target
.
szPname
)
/
sizeof
(
WCHAR
));
break
;
default:
WARN
(
"Unsupported fdwControls=0x%08
l
x
\n
"
,
fdwInfo
);
WARN
(
"Unsupported fdwControls=0x%08x
\n
"
,
fdwInfo
);
return
MMSYSERR_INVALFLAG
;
}
...
...
@@ -645,7 +645,7 @@ UINT WINAPI mixerSetControlDetails(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcd,
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p, %p, %08
l
x)
\n
"
,
hmix
,
lpmcd
,
fdwDetails
);
TRACE
(
"(%p, %p, %08x)
\n
"
,
hmix
,
lpmcd
,
fdwDetails
);
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwDetails
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
...
...
@@ -661,8 +661,8 @@ DWORD WINAPI mixerMessage(HMIXER hmix, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR
{
LPWINE_MLD
wmld
;
TRACE
(
"(%
04lx
, %d, %08lx, %08lx): semi-stub?
\n
"
,
(
DWORD
)
hmix
,
uMsg
,
dwParam1
,
dwParam2
);
TRACE
(
"(%
p
, %d, %08lx, %08lx): semi-stub?
\n
"
,
hmix
,
uMsg
,
dwParam1
,
dwParam2
);
if
((
wmld
=
MMDRV_Get
(
hmix
,
MMDRV_MIXER
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -741,7 +741,7 @@ UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%04X, %
l
u) !
\n
"
,
uDeviceID
,
dwVolume
);
TRACE
(
"(%04X, %u) !
\n
"
,
uDeviceID
,
dwVolume
);
if
((
wmld
=
MMDRV_Get
((
HANDLE
)
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -868,8 +868,8 @@ UINT WINAPI midiOutGetErrorTextW(UINT uError, LPWSTR lpText, UINT uSize)
/**************************************************************************
* MIDI_OutAlloc [internal]
*/
static
LPWINE_MIDI
MIDI_OutAlloc
(
HMIDIOUT
*
lphMidiOut
,
LPDWORD
lpdwCallback
,
LPDWORD
lpdwInstance
,
LPDWORD
lpdwFlags
,
static
LPWINE_MIDI
MIDI_OutAlloc
(
HMIDIOUT
*
lphMidiOut
,
DWORD_PTR
*
lpdwCallback
,
DWORD_PTR
*
lpdwInstance
,
LPDWORD
lpdwFlags
,
DWORD
cIDs
,
MIDIOPENSTRMID
*
lpIDs
,
BOOL
bFrom32
)
{
HANDLE
hMidiOut
;
...
...
@@ -903,7 +903,7 @@ UINT MIDI_OutOpen(LPHMIDIOUT lphMidiOut, UINT uDeviceID, DWORD_PTR dwCallback,
LPWINE_MIDI
lpwm
;
UINT
dwRet
=
0
;
TRACE
(
"(%p, %d, %08lX, %08lX, %08
l
X);
\n
"
,
TRACE
(
"(%p, %d, %08lX, %08lX, %08X);
\n
"
,
lphMidiOut
,
uDeviceID
,
dwCallback
,
dwInstance
,
dwFlags
);
if
(
lphMidiOut
!=
NULL
)
*
lphMidiOut
=
0
;
...
...
@@ -1006,7 +1006,7 @@ UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%p, %08
l
X)
\n
"
,
hMidiOut
,
dwMsg
);
TRACE
(
"(%p, %08X)
\n
"
,
hMidiOut
,
dwMsg
);
if
((
wmld
=
MMDRV_Get
(
hMidiOut
,
MMDRV_MIDIOUT
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -1067,7 +1067,7 @@ UINT WINAPI midiOutSetVolume(HMIDIOUT hMidiOut, DWORD dwVolume)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%p, %
l
d);
\n
"
,
hMidiOut
,
dwVolume
);
TRACE
(
"(%p, %d);
\n
"
,
hMidiOut
,
dwVolume
);
if
((
wmld
=
MMDRV_Get
(
hMidiOut
,
MMDRV_MIDIOUT
,
TRUE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -1201,7 +1201,7 @@ UINT MIDI_InOpen(HMIDIIN* lphMidiIn, UINT uDeviceID, DWORD_PTR dwCallback,
LPWINE_MIDI
lpwm
;
DWORD
dwRet
=
0
;
TRACE
(
"(%p, %d, %08lX, %08lX, %08
l
X);
\n
"
,
TRACE
(
"(%p, %d, %08lX, %08lX, %08X);
\n
"
,
lphMidiIn
,
uDeviceID
,
dwCallback
,
dwInstance
,
dwFlags
);
if
(
lphMidiIn
!=
NULL
)
*
lphMidiIn
=
0
;
...
...
@@ -1224,7 +1224,7 @@ UINT MIDI_InOpen(HMIDIIN* lphMidiIn, UINT uDeviceID, DWORD_PTR dwCallback,
hMidiIn
=
0
;
}
if
(
lphMidiIn
!=
NULL
)
*
lphMidiIn
=
hMidiIn
;
TRACE
(
"=> %
l
d hMidi=%p
\n
"
,
dwRet
,
hMidiIn
);
TRACE
(
"=> %d hMidi=%p
\n
"
,
dwRet
,
hMidiIn
);
return
dwRet
;
}
...
...
@@ -1520,9 +1520,9 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
*/
lpMidiHdr
=
(
LPMIDIHDR
)
msg
->
lParam
;
lpData
=
(
LPBYTE
)
lpMidiHdr
->
lpData
;
TRACE
(
"Adding %s lpMidiHdr=%p [lpData=0x%
08lx dwBufferLength=%lu/%lu dwFlags=0x%08l
x size=%u]
\n
"
,
TRACE
(
"Adding %s lpMidiHdr=%p [lpData=0x%
p dwBufferLength=%u/%u dwFlags=0x%08
x size=%u]
\n
"
,
(
lpMidiHdr
->
dwFlags
&
MHDR_ISSTRM
)
?
"stream"
:
"regular"
,
lpMidiHdr
,
(
DWORD
)
lpMidiHdr
,
lpMidiHdr
->
dwBufferLength
,
lpMidiHdr
->
dwBytesRecorded
,
lpMidiHdr
,
lpMidiHdr
->
dwBufferLength
,
lpMidiHdr
->
dwBytesRecorded
,
lpMidiHdr
->
dwFlags
,
msg
->
wParam
);
#if 0
/* dumps content of lpMidiHdr->lpData
...
...
@@ -1547,7 +1547,7 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
if
(((
LPMIDIEVENT
)
lpData
)
->
dwStreamID
!=
0
&&
((
LPMIDIEVENT
)
lpData
)
->
dwStreamID
!=
0xFFFFFFFF
&&
((
LPMIDIEVENT
)
lpData
)
->
dwStreamID
!=
(
DWORD
)
lpMidiStrm
)
{
FIXME
(
"Dropping bad %s lpMidiHdr (streamID=%08
l
x)
\n
"
,
FIXME
(
"Dropping bad %s lpMidiHdr (streamID=%08x)
\n
"
,
(
lpMidiHdr
->
dwFlags
&
MHDR_ISSTRM
)
?
"stream"
:
"regular"
,
((
LPMIDIEVENT
)
lpData
)
->
dwStreamID
);
lpMidiHdr
->
dwFlags
|=
MHDR_DONE
;
...
...
@@ -1637,7 +1637,7 @@ static DWORD CALLBACK MMSYSTEM_MidiStream_Player(LPVOID pmt)
dwToGo
=
lpMidiStrm
->
dwStartTicks
+
lpMidiStrm
->
dwPositionMS
;
TRACE
(
"%
ld/%ld/%l
d
\n
"
,
dwToGo
,
GetTickCount
(),
me
->
dwDeltaTime
);
TRACE
(
"%
d/%d/%
d
\n
"
,
dwToGo
,
GetTickCount
(),
me
->
dwDeltaTime
);
while
((
dwCurrTC
=
GetTickCount
())
<
dwToGo
)
{
if
(
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
dwToGo
-
dwCurrTC
,
QS_ALLINPUT
)
==
WAIT_OBJECT_0
)
{
/* got a message, handle it */
...
...
@@ -1751,7 +1751,7 @@ MMRESULT MIDI_StreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID, DWORD cMidi
LPWINE_MIDI
lpwm
;
HMIDIOUT
hMidiOut
;
TRACE
(
"(%p, %p, %
ld, 0x%08lx, 0x%08lx, 0x%08l
x)!
\n
"
,
TRACE
(
"(%p, %p, %
d, 0x%08lx, 0x%08lx, 0x%08
x)!
\n
"
,
lphMidiStrm
,
lpuDeviceID
,
cMidi
,
dwCallback
,
dwInstance
,
fdwOpen
);
if
(
cMidi
!=
1
||
lphMidiStrm
==
NULL
||
lpuDeviceID
==
NULL
)
...
...
@@ -1857,7 +1857,7 @@ MMRESULT WINAPI midiStreamPause(HMIDISTRM hMidiStrm)
ret
=
MMSYSERR_INVALHANDLE
;
}
else
{
if
(
SuspendThread
(
lpMidiStrm
->
hThread
)
==
0xFFFFFFFF
)
{
WARN
(
"bad Suspend (%
l
d)
\n
"
,
GetLastError
());
WARN
(
"bad Suspend (%d)
\n
"
,
GetLastError
());
ret
=
MMSYSERR_ERROR
;
}
}
...
...
@@ -1882,11 +1882,11 @@ MMRESULT WINAPI midiStreamPosition(HMIDISTRM hMidiStrm, LPMMTIME lpMMT, UINT cbm
switch
(
lpMMT
->
wType
)
{
case
TIME_MS
:
lpMMT
->
u
.
ms
=
lpMidiStrm
->
dwPositionMS
;
TRACE
(
"=> %
l
d ms
\n
"
,
lpMMT
->
u
.
ms
);
TRACE
(
"=> %d ms
\n
"
,
lpMMT
->
u
.
ms
);
break
;
case
TIME_TICKS
:
lpMMT
->
u
.
ticks
=
lpMidiStrm
->
dwPulses
;
TRACE
(
"=> %
l
d ticks
\n
"
,
lpMMT
->
u
.
ticks
);
TRACE
(
"=> %d ticks
\n
"
,
lpMMT
->
u
.
ticks
);
break
;
default:
WARN
(
"Unsupported time type %d
\n
"
,
lpMMT
->
wType
);
...
...
@@ -1906,7 +1906,7 @@ MMRESULT WINAPI midiStreamProperty(HMIDISTRM hMidiStrm, LPBYTE lpPropData, DWORD
WINE_MIDIStream
*
lpMidiStrm
;
MMRESULT
ret
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p, %p, %
l
x)
\n
"
,
hMidiStrm
,
lpPropData
,
dwProperty
);
TRACE
(
"(%p, %p, %x)
\n
"
,
hMidiStrm
,
lpPropData
,
dwProperty
);
if
(
!
MMSYSTEM_GetMidiStream
(
hMidiStrm
,
&
lpMidiStrm
,
NULL
))
{
ret
=
MMSYSERR_INVALHANDLE
;
...
...
@@ -1919,10 +1919,10 @@ MMRESULT WINAPI midiStreamProperty(HMIDISTRM hMidiStrm, LPBYTE lpPropData, DWORD
ret
=
MMSYSERR_INVALPARAM
;
}
else
if
(
dwProperty
&
MIDIPROP_SET
)
{
lpMidiStrm
->
dwTempo
=
mpt
->
dwTempo
;
TRACE
(
"Setting tempo to %
l
d
\n
"
,
mpt
->
dwTempo
);
TRACE
(
"Setting tempo to %d
\n
"
,
mpt
->
dwTempo
);
}
else
if
(
dwProperty
&
MIDIPROP_GET
)
{
mpt
->
dwTempo
=
lpMidiStrm
->
dwTempo
;
TRACE
(
"Getting tempo <= %
l
d
\n
"
,
mpt
->
dwTempo
);
TRACE
(
"Getting tempo <= %d
\n
"
,
mpt
->
dwTempo
);
}
}
else
if
(
dwProperty
&
MIDIPROP_TIMEDIV
)
{
MIDIPROPTIMEDIV
*
mptd
=
(
MIDIPROPTIMEDIV
*
)
lpPropData
;
...
...
@@ -1931,10 +1931,10 @@ MMRESULT WINAPI midiStreamProperty(HMIDISTRM hMidiStrm, LPBYTE lpPropData, DWORD
ret
=
MMSYSERR_INVALPARAM
;
}
else
if
(
dwProperty
&
MIDIPROP_SET
)
{
lpMidiStrm
->
dwTimeDiv
=
mptd
->
dwTimeDiv
;
TRACE
(
"Setting time div to %
l
d
\n
"
,
mptd
->
dwTimeDiv
);
TRACE
(
"Setting time div to %d
\n
"
,
mptd
->
dwTimeDiv
);
}
else
if
(
dwProperty
&
MIDIPROP_GET
)
{
mptd
->
dwTimeDiv
=
lpMidiStrm
->
dwTimeDiv
;
TRACE
(
"Getting time div <= %
l
d
\n
"
,
mptd
->
dwTimeDiv
);
TRACE
(
"Getting time div <= %d
\n
"
,
mptd
->
dwTimeDiv
);
}
}
else
{
ret
=
MMSYSERR_INVALPARAM
;
...
...
@@ -1965,7 +1965,7 @@ MMRESULT WINAPI midiStreamRestart(HMIDISTRM hMidiStrm)
ret
=
ResumeThread
(
lpMidiStrm
->
hThread
);
}
while
(
ret
!=
0xFFFFFFFF
&&
ret
!=
0
);
if
(
ret
==
0xFFFFFFFF
)
{
WARN
(
"bad Resume (%
l
d)
\n
"
,
GetLastError
());
WARN
(
"bad Resume (%d)
\n
"
,
GetLastError
());
ret
=
MMSYSERR_ERROR
;
}
else
{
lpMidiStrm
->
dwStartTicks
=
GetTickCount
()
-
lpMidiStrm
->
dwPositionMS
;
...
...
@@ -2003,7 +2003,7 @@ UINT WAVE_Open(HANDLE* lphndl, UINT uDeviceID, UINT uType,
DWORD
dwRet
=
MMSYSERR_NOERROR
;
WAVEOPENDESC
wod
;
TRACE
(
"(%p, %d, %s, %p, %08lX, %08lX, %08
l
X, %d);
\n
"
,
TRACE
(
"(%p, %d, %s, %p, %08lX, %08lX, %08X, %d);
\n
"
,
lphndl
,
(
int
)
uDeviceID
,
(
uType
==
MMDRV_WAVEOUT
)
?
"Out"
:
"In"
,
lpFormat
,
dwCallback
,
dwInstance
,
dwFlags
,
bFrom32
?
32
:
16
);
...
...
@@ -2021,7 +2021,7 @@ UINT WAVE_Open(HANDLE* lphndl, UINT uDeviceID, UINT uType,
}
/* may have a PCMWAVEFORMAT rather than a WAVEFORMATEX so don't read cbSize */
TRACE
(
"wFormatTag=%u, nChannels=%u, nSamplesPerSec=%
lu, nAvgBytesPerSec=%l
u, nBlockAlign=%u, wBitsPerSample=%u
\n
"
,
TRACE
(
"wFormatTag=%u, nChannels=%u, nSamplesPerSec=%
u, nAvgBytesPerSec=%
u, nBlockAlign=%u, wBitsPerSample=%u
\n
"
,
lpFormat
->
wFormatTag
,
lpFormat
->
nChannels
,
lpFormat
->
nSamplesPerSec
,
lpFormat
->
nAvgBytesPerSec
,
lpFormat
->
nBlockAlign
,
lpFormat
->
wBitsPerSample
);
...
...
@@ -2037,7 +2037,7 @@ UINT WAVE_Open(HANDLE* lphndl, UINT uDeviceID, UINT uType,
wod
.
dwInstance
=
dwInstance
;
wod
.
dnDevNode
=
0L
;
TRACE
(
"cb=%08
l
x
\n
"
,
wod
.
dwCallback
);
TRACE
(
"cb=%08x
\n
"
,
wod
.
dwCallback
);
for
(;;)
{
if
(
dwFlags
&
WAVE_MAPPED
)
{
...
...
@@ -2367,7 +2367,7 @@ UINT WINAPI waveOutGetPitch(HWAVEOUT hWaveOut, LPDWORD lpdw)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%p, %
08lx);
\n
"
,
hWaveOut
,
(
DWORD
)
lpdw
);
TRACE
(
"(%p, %
p);
\n
"
,
hWaveOut
,
lpdw
);
if
((
wmld
=
MMDRV_Get
(
hWaveOut
,
MMDRV_WAVEOUT
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -2381,7 +2381,7 @@ UINT WINAPI waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dw)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%p, %08
lx);
\n
"
,
hWaveOut
,
(
DWORD
)
dw
);
TRACE
(
"(%p, %08
x);
\n
"
,
hWaveOut
,
dw
);
if
((
wmld
=
MMDRV_Get
(
hWaveOut
,
MMDRV_WAVEOUT
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -2395,7 +2395,7 @@ UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT hWaveOut, LPDWORD lpdw)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%p, %
08lx);
\n
"
,
hWaveOut
,
(
DWORD
)
lpdw
);
TRACE
(
"(%p, %
p);
\n
"
,
hWaveOut
,
lpdw
);
if
((
wmld
=
MMDRV_Get
(
hWaveOut
,
MMDRV_WAVEOUT
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -2409,7 +2409,7 @@ UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dw)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%p, %08
lx);
\n
"
,
hWaveOut
,
(
DWORD
)
dw
);
TRACE
(
"(%p, %08
x);
\n
"
,
hWaveOut
,
dw
);
if
((
wmld
=
MMDRV_Get
(
hWaveOut
,
MMDRV_WAVEOUT
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -2423,7 +2423,7 @@ UINT WINAPI waveOutGetVolume(HWAVEOUT hWaveOut, LPDWORD lpdw)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%p, %
08lx);
\n
"
,
hWaveOut
,
(
DWORD
)
lpdw
);
TRACE
(
"(%p, %
p);
\n
"
,
hWaveOut
,
lpdw
);
if
(
lpdw
==
NULL
)
{
WARN
(
"invalid parameter
\n
"
);
...
...
@@ -2443,7 +2443,7 @@ UINT WINAPI waveOutSetVolume(HWAVEOUT hWaveOut, DWORD dw)
{
LPWINE_MLD
wmld
;
TRACE
(
"(%p, %08
l
x);
\n
"
,
hWaveOut
,
dw
);
TRACE
(
"(%p, %08x);
\n
"
,
hWaveOut
,
dw
);
if
((
wmld
=
MMDRV_Get
(
hWaveOut
,
MMDRV_WAVEOUT
,
TRUE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
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