Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fd758586
Commit
fd758586
authored
Jun 01, 2004
by
Robert Reif
Committed by
Alexandre Julliard
Jun 01, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some trace and debug printing.
parent
458cf0bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
10 deletions
+46
-10
lolvldrv.c
dlls/winmm/lolvldrv.c
+8
-8
winemm.h
dlls/winmm/winemm.h
+1
-0
winmm.c
dlls/winmm/winmm.c
+37
-2
No files found.
dlls/winmm/lolvldrv.c
View file @
fd758586
...
...
@@ -221,7 +221,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08lx 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
(
"=> %
lu
\n
"
,
ret
);
TRACE
(
"=> %
s
\n
"
,
WINMM_ErrorToString
(
ret
)
);
}
else
{
map
=
llType
->
Map16To32A
(
wMsg
,
&
mld
->
dwDriverInstance
,
&
dwParam1
,
&
dwParam2
);
switch
(
map
)
{
...
...
@@ -238,7 +238,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
ret
=
part
->
u
.
fnMessage32
(
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
TRACE
(
"=> %lu
\n
"
,
ret
);
TRACE
(
"=> %s
\n
"
,
WINMM_ErrorToString
(
ret
)
);
if
(
map
==
WINMM_MAP_OKMEM
)
llType
->
UnMap16To32A
(
wMsg
,
&
mld
->
dwDriverInstance
,
&
dwParam1
,
&
dwParam2
,
ret
);
break
;
...
...
@@ -268,7 +268,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
ret
=
pFnCallMMDrvFunc16
((
DWORD
)
part
->
u
.
fnMessage16
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
TRACE
(
"=> %lu
\n
"
,
ret
);
TRACE
(
"=> %s
\n
"
,
WINMM_ErrorToString
(
ret
)
);
if
(
map
==
WINMM_MAP_OKMEM
)
llType
->
UnMap32ATo16
(
wMsg
,
&
mld
->
dwDriverInstance
,
&
dwParam1
,
&
dwParam2
,
ret
);
break
;
...
...
@@ -283,7 +283,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
ret
=
pFnCallMMDrvFunc16
((
DWORD
)
part
->
u
.
fnMessage16
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
);
TRACE
(
"=> %
lu
\n
"
,
ret
);
TRACE
(
"=> %
s
\n
"
,
WINMM_ErrorToString
(
ret
)
);
}
}
return
ret
;
...
...
@@ -540,7 +540,7 @@ static BOOL MMDRV_InitPerType(LPWINE_MM_DRIVER lpDrv, UINT type, UINT wMsg)
if
(
lpDrv
->
bIs32
&&
part
->
u
.
fnMessage32
)
{
ret
=
part
->
u
.
fnMessage32
(
0
,
DRVM_INIT
,
0L
,
0L
,
0L
);
TRACE
(
"DRVM_INIT => %
08lx
\n
"
,
ret
);
TRACE
(
"DRVM_INIT => %
s
\n
"
,
WINMM_ErrorToString
(
ret
)
);
#if 0
ret = part->u.fnMessage32(0, DRVM_ENABLE, 0L, 0L, 0L);
TRACE("DRVM_ENABLE => %08lx\n", ret);
...
...
@@ -549,7 +549,7 @@ static BOOL MMDRV_InitPerType(LPWINE_MM_DRIVER lpDrv, UINT type, UINT wMsg)
}
else
if
(
!
lpDrv
->
bIs32
&&
part
->
u
.
fnMessage16
&&
pFnCallMMDrvFunc16
)
{
ret
=
pFnCallMMDrvFunc16
((
DWORD
)
part
->
u
.
fnMessage16
,
0
,
DRVM_INIT
,
0L
,
0L
,
0L
);
TRACE
(
"DRVM_INIT => %
08lx
\n
"
,
ret
);
TRACE
(
"DRVM_INIT => %
s
\n
"
,
WINMM_ErrorToString
(
ret
)
);
#if 0
ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, DRVM_ENABLE, 0L, 0L, 0L);
...
...
@@ -795,7 +795,7 @@ static BOOL MMDRV_ExitPerType(LPWINE_MM_DRIVER lpDrv, UINT type)
TRACE("DRVM_DISABLE => %08lx\n", ret);
#endif
ret
=
part
->
u
.
fnMessage32
(
0
,
DRVM_EXIT
,
0L
,
0L
,
0L
);
TRACE
(
"DRVM_EXIT => %
08lx
\n
"
,
ret
);
TRACE
(
"DRVM_EXIT => %
s
\n
"
,
WINMM_ErrorToString
(
ret
)
);
}
else
if
(
!
lpDrv
->
bIs32
&&
part
->
u
.
fnMessage16
&&
pFnCallMMDrvFunc16
)
{
#if 0
ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
...
...
@@ -804,7 +804,7 @@ static BOOL MMDRV_ExitPerType(LPWINE_MM_DRIVER lpDrv, UINT type)
#endif
ret
=
pFnCallMMDrvFunc16
((
DWORD
)
part
->
u
.
fnMessage16
,
0
,
DRVM_EXIT
,
0L
,
0L
,
0L
);
TRACE
(
"DRVM_EXIT => %
08lx
\n
"
,
ret
);
TRACE
(
"DRVM_EXIT => %
s
\n
"
,
WINMM_ErrorToString
(
ret
)
);
}
else
{
return
FALSE
;
}
...
...
dlls/winmm/winemm.h
View file @
fd758586
...
...
@@ -256,6 +256,7 @@ DWORD MCI_SendCommandFrom16(UINT wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwP
UINT
MCI_SetCommandTable
(
void
*
table
,
UINT
uDevType
);
BOOL
WINMM_CheckForMMSystem
(
void
);
const
char
*
WINMM_ErrorToString
(
MMRESULT
error
);
UINT
MIXER_Open
(
LPHMIXER
lphMix
,
UINT
uDeviceID
,
DWORD
dwCallback
,
DWORD
dwInstance
,
DWORD
fdwOpen
,
BOOL
bFrom32
);
...
...
dlls/winmm/winmm.c
View file @
fd758586
...
...
@@ -28,6 +28,7 @@
* 99/9 added support for loadable low level drivers
*/
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
...
...
@@ -135,6 +136,36 @@ BOOL WINMM_CheckForMMSystem(void)
return
loaded
>
0
;
}
/******************************************************************
* WINMM_ErrorToString
*/
const
char
*
WINMM_ErrorToString
(
MMRESULT
error
)
{
#define ERR_TO_STR(dev) case dev: return #dev
static
char
unknown
[
32
];
switch
(
error
)
{
ERR_TO_STR
(
MMSYSERR_NOERROR
);
ERR_TO_STR
(
MMSYSERR_ERROR
);
ERR_TO_STR
(
MMSYSERR_BADDEVICEID
);
ERR_TO_STR
(
MMSYSERR_NOTENABLED
);
ERR_TO_STR
(
MMSYSERR_ALLOCATED
);
ERR_TO_STR
(
MMSYSERR_INVALHANDLE
);
ERR_TO_STR
(
MMSYSERR_NODRIVER
);
ERR_TO_STR
(
MMSYSERR_NOMEM
);
ERR_TO_STR
(
MMSYSERR_NOTSUPPORTED
);
ERR_TO_STR
(
MMSYSERR_BADERRNUM
);
ERR_TO_STR
(
MMSYSERR_INVALFLAG
);
ERR_TO_STR
(
MMSYSERR_INVALPARAM
);
ERR_TO_STR
(
WAVERR_BADFORMAT
);
ERR_TO_STR
(
WAVERR_STILLPLAYING
);
ERR_TO_STR
(
WAVERR_UNPREPARED
);
ERR_TO_STR
(
WAVERR_SYNC
);
}
sprintf
(
unknown
,
"Unknown(0x%08x)"
,
error
);
return
unknown
;
#undef ERR_TO_STR
}
/**************************************************************************
* DllMain (WINMM.init)
*
...
...
@@ -2469,6 +2500,7 @@ UINT WAVE_Open(HANDLE* lphndl, UINT uDeviceID, UINT uType,
dwRet
=
MMDRV_Open
(
wmld
,
(
uType
==
MMDRV_WAVEOUT
)
?
WODM_OPEN
:
WIDM_OPEN
,
(
DWORD
)
&
wod
,
dwFlags
);
TRACE
(
"dwRet = %s
\n
"
,
WINMM_ErrorToString
(
dwRet
));
if
(
dwRet
!=
WAVERR_BADFORMAT
||
(
dwFlags
&
(
WAVE_MAPPED
|
WAVE_FORMAT_DIRECT
))
!=
0
)
break
;
/* if we ask for a format which isn't supported by the physical driver,
...
...
@@ -2485,7 +2517,7 @@ UINT WAVE_Open(HANDLE* lphndl, UINT uDeviceID, UINT uType,
}
if
(
lphndl
!=
NULL
)
*
lphndl
=
handle
;
TRACE
(
"=> %
ld hWave=%p
\n
"
,
dwRet
,
handle
);
TRACE
(
"=> %
s hWave=%p
\n
"
,
WINMM_ErrorToString
(
dwRet
)
,
handle
);
return
dwRet
;
}
...
...
@@ -2867,12 +2899,15 @@ UINT WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage,
if
((
wmld
=
MMDRV_Get
(
hWaveOut
,
MMDRV_WAVEOUT
,
TRUE
))
!=
NULL
)
{
return
MMDRV_PhysicalFeatures
(
wmld
,
uMessage
,
dwParam1
,
dwParam2
);
}
WARN
(
"invalid handle
\n
"
);
return
MMSYSERR_INVALHANDLE
;
}
/* from M$ KB */
if
(
uMessage
<
DRVM_IOCTL
||
(
uMessage
>=
DRVM_IOCTL_LAST
&&
uMessage
<
DRVM_MAPPER
))
if
(
uMessage
<
DRVM_IOCTL
||
(
uMessage
>=
DRVM_IOCTL_LAST
&&
uMessage
<
DRVM_MAPPER
))
{
WARN
(
"invalid parameter
\n
"
);
return
MMSYSERR_INVALPARAM
;
}
return
MMDRV_Message
(
wmld
,
uMessage
,
dwParam1
,
dwParam2
,
TRUE
);
}
...
...
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