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
8f813fd4
Commit
8f813fd4
authored
May 20, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Fix some Win64 pointer truncations issues.
parent
1c66fab8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
67 deletions
+66
-67
lolvldrv.c
dlls/winmm/lolvldrv.c
+14
-14
mci.c
dlls/winmm/mci.c
+8
-8
message16.c
dlls/winmm/message16.c
+24
-24
playsound.c
dlls/winmm/playsound.c
+5
-5
winemm.h
dlls/winmm/winemm.h
+5
-6
winmm.c
dlls/winmm/winmm.c
+10
-10
No files found.
dlls/winmm/lolvldrv.c
View file @
8f813fd4
...
...
@@ -125,7 +125,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
WINMM_MapType
map
;
int
devID
;
TRACE
(
"(%s %u %u 0x%08x 0x%08lx 0x%08lx %c)
\n
"
,
TRACE
(
"(%s %u %u 0x%08
l
x 0x%08lx 0x%08lx %c)
\n
"
,
llTypes
[
mld
->
type
].
typestr
,
mld
->
uDeviceID
,
wMsg
,
mld
->
dwDriverInstance
,
dwParam1
,
dwParam2
,
bFrom32
?
'Y'
:
'N'
);
...
...
@@ -159,7 +159,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%08x p1=0x%08lx p2=0x%08lx)
\n
"
,
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08
l
x 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
));
...
...
@@ -175,7 +175,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%08x p1=0x%08lx p2=0x%08lx)
\n
"
,
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08
l
x 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
);
...
...
@@ -204,7 +204,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%08x p1=0x%08lx p2=0x%08lx)
\n
"
,
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08
l
x 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
,
...
...
@@ -219,7 +219,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
break
;
}
}
else
{
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08x p1=0x%08lx p2=0x%08lx)
\n
"
,
TRACE
(
"Calling message(dev=%u msg=%u usr=0x%08
l
x 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
,
...
...
@@ -237,7 +237,7 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
DWORD_PTR
*
dwCallback
,
DWORD_PTR
*
dwInstance
,
BOOL
bFrom32
)
{
LPWINE_MLD
mld
;
UINT
i
;
UINT
_PTR
i
;
TRACE
(
"(%d, %04x, %p, %p, %p, %p, %c)
\n
"
,
size
,
type
,
hndl
,
dwFlags
,
dwCallback
,
dwInstance
,
bFrom32
?
'Y'
:
'N'
);
...
...
@@ -257,7 +257,7 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
*
hndl
=
(
HANDLE
)(
i
|
0x8000
);
mld
->
type
=
type
;
if
((
UINT
)
*
hndl
<
MMDRV_GetNum
(
type
)
||
HIWORD
(
*
hndl
)
!=
0
)
{
if
((
UINT
_PTR
)
*
hndl
<
MMDRV_GetNum
(
type
)
||
((
UINT_PTR
)
*
hndl
>>
16
)
)
{
/* FIXME: those conditions must be fulfilled so that:
* - we can distinguish between device IDs and handles
* - we can use handles as 16 or 32 bit entities
...
...
@@ -287,8 +287,8 @@ void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld)
{
TRACE
(
"(%p, %p)
\n
"
,
hndl
,
mld
);
if
((
UINT
)
hndl
&
0x8000
)
{
unsigned
idx
=
(
UINT
)
hndl
&
~
0x8000
;
if
((
UINT
_PTR
)
hndl
&
0x8000
)
{
UINT_PTR
idx
=
(
UINT_PTR
)
hndl
&
~
0x8000
;
if
(
idx
<
sizeof
(
MM_MLDrvs
)
/
sizeof
(
MM_MLDrvs
[
0
]))
{
MM_MLDrvs
[
idx
]
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
mld
);
...
...
@@ -301,14 +301,14 @@ void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld)
/**************************************************************************
* MMDRV_Open [internal]
*/
DWORD
MMDRV_Open
(
LPWINE_MLD
mld
,
UINT
wMsg
,
DWORD
dwParam1
,
DWORD
dwFlags
)
DWORD
MMDRV_Open
(
LPWINE_MLD
mld
,
UINT
wMsg
,
DWORD_PTR
dwParam1
,
DWORD
dwFlags
)
{
DWORD
dwRet
=
MMSYSERR_BADDEVICEID
;
DWORD
dwInstance
;
DWORD
_PTR
dwInstance
;
WINE_LLTYPE
*
llType
=
&
llTypes
[
mld
->
type
];
TRACE
(
"(%p, %04x, 0x%08x, 0x%08x)
\n
"
,
mld
,
wMsg
,
dwParam1
,
dwFlags
);
TRACE
(
"(%p, %04x, 0x%08
l
x, 0x%08x)
\n
"
,
mld
,
wMsg
,
dwParam1
,
dwFlags
);
mld
->
dwDriverInstance
=
(
DWORD
)
&
dwInstance
;
mld
->
dwDriverInstance
=
(
DWORD
_PTR
)
&
dwInstance
;
if
(
mld
->
uDeviceID
==
(
UINT
)
-
1
||
mld
->
uDeviceID
==
(
UINT16
)
-
1
)
{
TRACE
(
"MAPPER mode requested !
\n
"
);
...
...
@@ -371,7 +371,7 @@ static LPWINE_MLD MMDRV_GetByID(UINT uDevID, UINT type)
LPWINE_MLD
MMDRV_Get
(
HANDLE
_hndl
,
UINT
type
,
BOOL
bCanBeID
)
{
LPWINE_MLD
mld
=
NULL
;
UINT
hndl
=
(
UINT
)
_hndl
;
UINT
_PTR
hndl
=
(
UINT_PTR
)
_hndl
;
TRACE
(
"(%p, %04x, %c)
\n
"
,
_hndl
,
type
,
bCanBeID
?
'Y'
:
'N'
);
assert
(
type
<
MMDRV_MAX
);
...
...
dlls/winmm/mci.c
View file @
8f813fd4
...
...
@@ -986,7 +986,7 @@ static DWORD MCI_FinishOpen(LPWINE_MCIDRIVER wmd, LPMCI_OPEN_PARMSW lpParms,
lpParms
->
wDeviceID
=
wmd
->
wDeviceID
;
return
MCI_SendCommandFrom32
(
wmd
->
wDeviceID
,
MCI_OPEN_DRIVER
,
dwParam
,
(
DWORD
)
lpParms
);
(
DWORD
_PTR
)
lpParms
);
}
/**************************************************************************
...
...
@@ -1470,7 +1470,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
MCI_UnLoadMciDriver
(
wmd
);
/* FIXME: notification is not properly shared across two opens */
}
else
{
dwRet
=
MCI_SendCommand
(
wmd
->
wDeviceID
,
MCI_GetMessage
(
lpCmd
),
dwFlags
,
(
DWORD
)
data
,
TRUE
);
dwRet
=
MCI_SendCommand
(
wmd
->
wDeviceID
,
MCI_GetMessage
(
lpCmd
),
dwFlags
,
(
DWORD
_PTR
)
data
,
TRUE
);
}
TRACE
(
"=> 1/ %x (%s)
\n
"
,
dwRet
,
debugstr_w
(
lpstrRet
));
dwRet
=
MCI_HandleReturnValues
(
dwRet
,
wmd
,
retType
,
data
,
lpstrRet
,
uRetLen
);
...
...
@@ -1649,7 +1649,7 @@ static DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSW lpParms)
if
(
dwParam
&
MCI_OPEN_TYPE
)
{
if
(
dwParam
&
MCI_OPEN_TYPE_ID
)
{
WORD
uDevType
=
LOWORD
(
(
DWORD
)
lpParms
->
lpstrDeviceType
);
WORD
uDevType
=
LOWORD
(
lpParms
->
lpstrDeviceType
);
if
(
uDevType
<
MCI_DEVTYPE_FIRST
||
uDevType
>
MCI_DEVTYPE_LAST
||
...
...
@@ -1792,7 +1792,7 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
return
MCIERR_INVALID_DEVICE_ID
;
}
dwRet
=
MCI_SendCommandFrom32
(
wDevID
,
MCI_CLOSE_DRIVER
,
dwParam
,
(
DWORD
)
lpParms
);
dwRet
=
MCI_SendCommandFrom32
(
wDevID
,
MCI_CLOSE_DRIVER
,
dwParam
,
(
DWORD
_PTR
)
lpParms
);
MCI_UnLoadMciDriver
(
wmd
);
...
...
@@ -1837,8 +1837,8 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm
if
(
lpParms
==
NULL
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
TRACE
(
"(%08x, %08X, %
08X
[num=%d, wDevTyp=%u])
\n
"
,
uDevID
,
dwFlags
,
(
DWORD
)
lpParms
,
lpParms
->
dwNumber
,
lpParms
->
wDeviceType
);
TRACE
(
"(%08x, %08X, %
p
[num=%d, wDevTyp=%u])
\n
"
,
uDevID
,
dwFlags
,
lpParms
,
lpParms
->
dwNumber
,
lpParms
->
wDeviceType
);
switch
(
dwFlags
&
~
MCI_SYSINFO_OPEN
)
{
case
MCI_SYSINFO_QUANTITY
:
...
...
@@ -2066,7 +2066,7 @@ DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD_PTR dwParam1,
* mciSendString), because MCI drivers return extra information for string
* transformation. This function gets rid of them.
*/
LRESULT
MCI_CleanUp
(
LRESULT
dwRet
,
UINT
wMsg
,
DWORD
dwParam2
)
LRESULT
MCI_CleanUp
(
LRESULT
dwRet
,
UINT
wMsg
,
DWORD
_PTR
dwParam2
)
{
if
(
LOWORD
(
dwRet
))
return
LOWORD
(
dwRet
);
...
...
@@ -2085,7 +2085,7 @@ LRESULT MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2)
{
LPMCI_GETDEVCAPS_PARMS
lmgp
;
lmgp
=
(
LPMCI_GETDEVCAPS_PARMS
)
(
void
*
)
dwParam2
;
lmgp
=
(
LPMCI_GETDEVCAPS_PARMS
)
dwParam2
;
TRACE
(
"Changing %08x to %08x
\n
"
,
lmgp
->
dwReturn
,
LOWORD
(
lmgp
->
dwReturn
));
lmgp
->
dwReturn
=
LOWORD
(
lmgp
->
dwReturn
);
}
...
...
dlls/winmm/message16.c
View file @
8f813fd4
This diff is collapsed.
Click to expand it.
dlls/winmm/playsound.c
View file @
8f813fd4
...
...
@@ -158,8 +158,8 @@ struct playsound_data
};
static
void
CALLBACK
PlaySound_Callback
(
HWAVEOUT
hwo
,
UINT
uMsg
,
DWORD
dwInstance
,
DWORD
dwParam1
,
DWORD
dwParam2
)
DWORD
_PTR
dwInstance
,
DWORD
_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
struct
playsound_data
*
s
=
(
struct
playsound_data
*
)
dwInstance
;
...
...
@@ -169,7 +169,7 @@ static void CALLBACK PlaySound_Callback(HWAVEOUT hwo, UINT uMsg,
break
;
case
WOM_DONE
:
InterlockedIncrement
(
&
s
->
dwEventCount
);
TRACE
(
"Returning waveHdr=%x
\n
"
,
dwParam1
);
TRACE
(
"Returning waveHdr=%
l
x
\n
"
,
dwParam1
);
SetEvent
(
s
->
hEvent
);
break
;
default:
...
...
@@ -398,8 +398,8 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
s
.
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
if
(
waveOutOpen
(
&
wps
->
hWave
,
WAVE_MAPPER
,
lpWaveFormat
,
(
DWORD
)
PlaySound_Callback
,
(
DWORD
)
&
s
,
CALLBACK_FUNCTION
)
!=
MMSYSERR_NOERROR
)
if
(
waveOutOpen
(
&
wps
->
hWave
,
WAVE_MAPPER
,
lpWaveFormat
,
(
DWORD
_PTR
)
PlaySound_Callback
,
(
DWORD
_PTR
)
&
s
,
CALLBACK_FUNCTION
)
!=
MMSYSERR_NOERROR
)
goto
errCleanUp
;
/* make it so that 3 buffers per second are needed */
...
...
dlls/winmm/winemm.h
View file @
8f813fd4
...
...
@@ -95,7 +95,7 @@ typedef struct tagWINE_MLD {
UINT
uDeviceID
;
UINT
type
;
UINT
mmdIndex
;
/* index to low-level driver in MMDrvs table */
DWORD
dwDriverInstance
;
/* this value is driver related, as opposed to
DWORD
_PTR
dwDriverInstance
;
/* this value is driver related, as opposed to
* opendesc.dwInstance which is client (callback) related */
WORD
bFrom32
;
WORD
dwFlags
;
...
...
@@ -176,9 +176,8 @@ typedef struct tagWINE_MMIO {
/* function prototypes */
typedef
LONG
(
*
MCIPROC
)(
DWORD
,
HDRVR
,
DWORD
,
DWORD
,
DWORD
);
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
);
typedef
WINMM_MapType
(
*
MMDRV_MAPFUNC
)(
UINT
wMsg
,
DWORD_PTR
*
lpdwUser
,
DWORD_PTR
*
lpParam1
,
DWORD_PTR
*
lpParam2
);
typedef
WINMM_MapType
(
*
MMDRV_UNMAPFUNC
)(
UINT
wMsg
,
DWORD_PTR
*
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
);
...
...
@@ -191,7 +190,7 @@ UINT MMDRV_GetNum(UINT);
LPWINE_MLD
MMDRV_Alloc
(
UINT
size
,
UINT
type
,
LPHANDLE
hndl
,
DWORD
*
dwFlags
,
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_Open
(
LPWINE_MLD
mld
,
UINT
wMsg
,
DWORD
_PTR
dwParam1
,
DWORD
dwParam2
);
DWORD
MMDRV_Close
(
LPWINE_MLD
mld
,
UINT
wMsg
);
LPWINE_MLD
MMDRV_Get
(
HANDLE
hndl
,
UINT
type
,
BOOL
bCanBeID
);
LPWINE_MLD
MMDRV_GetRelated
(
HANDLE
hndl
,
UINT
srcType
,
BOOL
bSrcCanBeID
,
UINT
dstTyped
);
...
...
@@ -203,7 +202,7 @@ void MMDRV_InstallMap(unsigned int, MMDRV_MAPFUNC, MMDRV_UNMAPFUNC,
WINE_MCIDRIVER
*
MCI_GetDriver
(
UINT16
uDevID
);
const
char
*
MCI_MessageToString
(
UINT
wMsg
);
LRESULT
MCI_CleanUp
(
LRESULT
dwRet
,
UINT
wMsg
,
DWORD
dwParam2
);
LRESULT
MCI_CleanUp
(
LRESULT
dwRet
,
UINT
wMsg
,
DWORD
_PTR
dwParam2
);
DWORD
MCI_SendCommand
(
UINT
wDevID
,
UINT16
wMsg
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
,
BOOL
bFrom32
);
UINT
MCI_SetCommandTable
(
void
*
table
,
UINT
uDevType
);
BOOL
MCI_DeleteCommandTable
(
UINT
uTbl
,
BOOL
delete
);
...
...
dlls/winmm/winmm.c
View file @
8f813fd4
...
...
@@ -365,7 +365,7 @@ UINT MIXER_Open(LPHMIXER lphMix, UINT uDeviceID, DWORD_PTR dwCallback,
wmld
->
uDeviceID
=
uDeviceID
;
mod
.
hmx
=
hMix
;
dwRet
=
MMDRV_Open
(
wmld
,
MXDM_OPEN
,
(
DWORD
)
&
mod
,
CALLBACK_FUNCTION
);
dwRet
=
MMDRV_Open
(
wmld
,
MXDM_OPEN
,
(
DWORD
_PTR
)
&
mod
,
CALLBACK_FUNCTION
);
if
(
dwRet
!=
MMSYSERR_NOERROR
)
{
MMDRV_Free
(
hMix
,
wmld
);
...
...
@@ -957,7 +957,7 @@ UINT MIDI_OutOpen(LPHMIDIOUT lphMidiOut, UINT uDeviceID, DWORD_PTR dwCallback,
lpwm
->
mld
.
uDeviceID
=
uDeviceID
;
dwRet
=
MMDRV_Open
((
LPWINE_MLD
)
lpwm
,
MODM_OPEN
,
(
DWORD
)
&
lpwm
->
mod
,
dwFlags
);
dwRet
=
MMDRV_Open
((
LPWINE_MLD
)
lpwm
,
MODM_OPEN
,
(
DWORD
_PTR
)
&
lpwm
->
mod
,
dwFlags
);
if
(
dwRet
!=
MMSYSERR_NOERROR
)
{
MMDRV_Free
(
hMidiOut
,
(
LPWINE_MLD
)
lpwm
);
...
...
@@ -1258,7 +1258,7 @@ UINT MIDI_InOpen(HMIDIIN* lphMidiIn, UINT uDeviceID, DWORD_PTR dwCallback,
lpwm
->
mod
.
dwInstance
=
dwInstance
;
lpwm
->
mld
.
uDeviceID
=
uDeviceID
;
dwRet
=
MMDRV_Open
(
&
lpwm
->
mld
,
MIDM_OPEN
,
(
DWORD
)
&
lpwm
->
mod
,
dwFlags
);
dwRet
=
MMDRV_Open
(
&
lpwm
->
mld
,
MIDM_OPEN
,
(
DWORD
_PTR
)
&
lpwm
->
mod
,
dwFlags
);
if
(
dwRet
!=
MMSYSERR_NOERROR
)
{
MMDRV_Free
(
hMidiIn
,
&
lpwm
->
mld
);
...
...
@@ -1540,7 +1540,7 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
(
HDRVR
)
lpMidiStrm
->
hDevice
,
MM_MOM_DONE
,
lpwm
->
mod
.
dwInstance
,
(
DWORD
)
lpMidiHdr
,
0L
);
lpwm
->
mod
.
dwInstance
,
(
DWORD
_PTR
)
lpMidiHdr
,
0
);
}
lpMidiStrm
->
lpMidiHdr
=
0
;
SetEvent
(
lpMidiStrm
->
hEvent
);
...
...
@@ -1614,7 +1614,7 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
(
HDRVR
)
lpMidiStrm
->
hDevice
,
MM_MOM_DONE
,
lpwm
->
mod
.
dwInstance
,
(
DWORD
)
lpMidiHdr
,
0L
);
lpwm
->
mod
.
dwInstance
,
(
DWORD
_PTR
)
lpMidiHdr
,
0
);
break
;
}
...
...
@@ -1749,7 +1749,7 @@ static DWORD CALLBACK MMSYSTEM_MidiStream_Player(LPVOID pmt)
lpMidiStrm
->
lpMidiHdr
=
lpMidiHdr
->
lpNext
;
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
(
HDRVR
)
lpMidiStrm
->
hDevice
,
MM_MOM_DONE
,
lpwm
->
mod
.
dwInstance
,
(
DWORD
)
lpMidiHdr
,
0L
);
lpwm
->
mod
.
dwInstance
,
(
DWORD
_PTR
)
lpMidiHdr
,
0
);
lpData
=
0
;
}
}
...
...
@@ -1834,7 +1834,7 @@ MMRESULT MIDI_StreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID, DWORD cMidi
lpwm
->
mld
.
uDeviceID
=
*
lpuDeviceID
;
ret
=
MMDRV_Open
(
&
lpwm
->
mld
,
MODM_OPEN
,
(
DWORD
)
&
lpwm
->
mod
,
fdwOpen
);
ret
=
MMDRV_Open
(
&
lpwm
->
mld
,
MODM_OPEN
,
(
DWORD
_PTR
)
&
lpwm
->
mod
,
fdwOpen
);
lpMidiStrm
->
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
lpMidiStrm
->
wFlags
=
HIWORD
(
fdwOpen
);
...
...
@@ -1894,7 +1894,7 @@ MMRESULT WINAPI midiStreamOut(HMIDISTRM hMidiStrm, LPMIDIHDR lpMidiHdr,
}
else
{
if
(
!
PostThreadMessageA
(
lpMidiStrm
->
dwThreadID
,
WINE_MSM_HEADER
,
cbMidiHdr
,
(
DWORD
)
lpMidiHdr
))
{
(
LPARAM
)
lpMidiHdr
))
{
WARN
(
"bad PostThreadMessageA
\n
"
);
ret
=
MMSYSERR_ERROR
;
}
...
...
@@ -2107,8 +2107,8 @@ UINT WAVE_Open(HANDLE* lphndl, UINT uDeviceID, UINT uType,
}
wmld
->
uDeviceID
=
uDeviceID
;
dwRet
=
MMDRV_Open
(
wmld
,
(
uType
==
MMDRV_WAVEOUT
)
?
WODM_OPEN
:
WIDM_OPEN
,
(
DWORD
)
&
wod
,
dwFlags
);
dwRet
=
MMDRV_Open
(
wmld
,
(
uType
==
MMDRV_WAVEOUT
)
?
WODM_OPEN
:
WIDM_OPEN
,
(
DWORD
_PTR
)
&
wod
,
dwFlags
);
TRACE
(
"dwRet = %s
\n
"
,
WINMM_ErrorToString
(
dwRet
));
if
(
dwRet
!=
WAVERR_BADFORMAT
||
...
...
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