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
1cc26cba
Commit
1cc26cba
authored
Feb 19, 2013
by
Jörg Höhle
Committed by
Alexandre Julliard
Feb 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmsystem: Do not rewrite input parameters.
parent
5155e801
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
46 deletions
+4
-46
message16.c
dlls/mmsystem.dll16/message16.c
+0
-12
mmsystem.c
dlls/mmsystem.dll16/mmsystem.c
+4
-34
No files found.
dlls/mmsystem.dll16/message16.c
View file @
1cc26cba
...
...
@@ -188,8 +188,6 @@ static MMSYSTEM_MapType MMSYSTDRV_MidiOut_Map16To32W (UINT wMsg, DWORD_PTR* lpP
mh32
->
dwBytesRecorded
=
mh16
->
dwBytesRecorded
;
mh32
->
dwUser
=
mh16
->
dwUser
;
mh32
->
dwFlags
=
mh16
->
dwFlags
;
/* FIXME: nothing on mh32->lpNext */
/* could link the mh32->lpNext at this level for memory house keeping */
mh32
->
dwOffset
=
(
*
lpParam2
>=
sizeof
(
MIDIHDR
))
?
mh16
->
dwOffset
:
0
;
mh16
->
lpNext
=
mh32
;
/* for reuse in unprepare and write */
/* store size of passed MIDIHDR?? structure to know if dwOffset is available or not */
...
...
@@ -278,9 +276,6 @@ static MMSYSTEM_MapType MMSYSTDRV_MidiOut_UnMap16To32W(UINT wMsg, DWORD_PTR* lp
LPMIDIHDR
mh16
=
MapSL
(
*
(
SEGPTR
*
)((
LPSTR
)
mh32
-
sizeof
(
LPMIDIHDR
)));
assert
(
mh16
->
lpNext
==
mh32
);
mh16
->
dwBufferLength
=
mh32
->
dwBufferLength
;
mh16
->
dwBytesRecorded
=
mh32
->
dwBytesRecorded
;
mh16
->
dwUser
=
mh32
->
dwUser
;
mh16
->
dwFlags
=
mh32
->
dwFlags
;
if
(
mh16
->
reserved
>=
sizeof
(
MIDIHDR
))
mh16
->
dwOffset
=
mh32
->
dwOffset
;
...
...
@@ -501,11 +496,8 @@ static MMSYSTEM_MapType MMSYSTDRV_WaveIn_UnMap16To32W(UINT wMsg, DWORD_PTR* lpP
LPWAVEHDR
wh16
=
MapSL
(
*
(
SEGPTR
*
)((
LPSTR
)
wh32
-
sizeof
(
LPWAVEHDR
)));
assert
(
wh16
->
lpNext
==
wh32
);
wh16
->
dwBufferLength
=
wh32
->
dwBufferLength
;
wh16
->
dwBytesRecorded
=
wh32
->
dwBytesRecorded
;
wh16
->
dwUser
=
wh32
->
dwUser
;
wh16
->
dwFlags
=
wh32
->
dwFlags
;
wh16
->
dwLoops
=
wh32
->
dwLoops
;
if
(
wMsg
==
WIDM_UNPREPARE
&&
fn_ret
==
MMSYSERR_NOERROR
)
{
HeapFree
(
GetProcessHeap
(),
0
,
(
LPSTR
)
wh32
-
sizeof
(
LPWAVEHDR
));
...
...
@@ -734,11 +726,7 @@ static MMSYSTEM_MapType MMSYSTDRV_WaveOut_UnMap16To32W(UINT wMsg, DWORD_PTR* lp
LPWAVEHDR
wh16
=
MapSL
(
*
(
SEGPTR
*
)((
LPSTR
)
wh32
-
sizeof
(
LPWAVEHDR
)));
assert
(
wh16
->
lpNext
==
wh32
);
wh16
->
dwBufferLength
=
wh32
->
dwBufferLength
;
wh16
->
dwBytesRecorded
=
wh32
->
dwBytesRecorded
;
wh16
->
dwUser
=
wh32
->
dwUser
;
wh16
->
dwFlags
=
wh32
->
dwFlags
;
wh16
->
dwLoops
=
wh32
->
dwLoops
;
if
(
wMsg
==
WODM_UNPREPARE
&&
fn_ret
==
MMSYSERR_NOERROR
)
{
HeapFree
(
GetProcessHeap
(),
0
,
(
LPSTR
)
wh32
-
sizeof
(
LPWAVEHDR
));
...
...
dlls/mmsystem.dll16/mmsystem.c
View file @
1cc26cba
...
...
@@ -104,20 +104,6 @@ void MMSYSTEM_MMTIME32to16(LPMMTIME16 mmt16, const MMTIME* mmt32)
memcpy
(
&
(
mmt16
->
u
),
&
(
mmt32
->
u
),
sizeof
(
mmt16
->
u
));
}
/******************************************************************
* MMSYSTEM_MMTIME16to32
*
*
*/
static
void
MMSYSTEM_MMTIME16to32
(
LPMMTIME
mmt32
,
const
MMTIME16
*
mmt16
)
{
mmt32
->
wType
=
mmt16
->
wType
;
/* layout of rest is the same for 32/16,
* Note: mmt16->u is 2 bytes smaller than mmt32->u, which has padding
*/
memcpy
(
&
(
mmt32
->
u
),
&
(
mmt16
->
u
),
sizeof
(
mmt16
->
u
));
}
/**************************************************************************
* timeGetSystemTime [MMSYSTEM.601]
*/
...
...
@@ -1153,7 +1139,7 @@ MMRESULT16 WINAPI midiStreamPosition16(HMIDISTRM16 hMidiStrm, LPMMTIME16 lpmmt16
if
(
!
lpmmt16
)
return
MMSYSERR_INVALPARAM
;
MMSYSTEM_MMTIME16to32
(
&
mmt32
,
lpmmt16
)
;
mmt32
.
wType
=
lpmmt16
->
wType
;
ret
=
midiStreamPosition
(
HMIDISTRM_32
(
hMidiStrm
),
&
mmt32
,
sizeof
(
MMTIME
));
MMSYSTEM_MMTIME32to16
(
lpmmt16
,
&
mmt32
);
return
ret
;
...
...
@@ -1288,24 +1274,11 @@ UINT16 WINAPI waveOutPrepareHeader16(HWAVEOUT16 hWaveOut, /* [in] */
SEGPTR
lpsegWaveOutHdr
,
/* [???] */
UINT16
uSize
)
/* [in] */
{
LPWAVEHDR
lpWaveOutHdr
=
MapSL
(
lpsegWaveOutHdr
);
UINT16
result
;
TRACE
(
"(%04X, %08x, %u);
\n
"
,
hWaveOut
,
lpsegWaveOutHdr
,
uSize
);
if
(
lp
WaveOutHdr
==
NULL
)
return
MMSYSERR_INVALPARAM
;
if
(
lp
segWaveOutHdr
==
0
)
return
MMSYSERR_INVALPARAM
;
if
((
result
=
MMSYSTDRV_Message
(
HWAVEOUT_32
(
hWaveOut
),
WODM_PREPARE
,
lpsegWaveOutHdr
,
uSize
))
!=
MMSYSERR_NOTSUPPORTED
)
return
result
;
if
(
lpWaveOutHdr
->
dwFlags
&
WHDR_INQUEUE
)
return
WAVERR_STILLPLAYING
;
lpWaveOutHdr
->
dwFlags
|=
WHDR_PREPARED
;
lpWaveOutHdr
->
dwFlags
&=
~
WHDR_DONE
;
return
MMSYSERR_NOERROR
;
return
MMSYSTDRV_Message
(
HWAVEOUT_32
(
hWaveOut
),
WODM_PREPARE
,
lpsegWaveOutHdr
,
uSize
);
}
/**************************************************************************
...
...
@@ -1581,15 +1554,12 @@ UINT16 WINAPI waveInPrepareHeader16(HWAVEIN16 hWaveIn, /* [in] */
UINT16
uSize
)
/* [in] */
{
LPWAVEHDR
lpWaveInHdr
=
MapSL
(
lpsegWaveInHdr
);
UINT16
ret
;
TRACE
(
"(%04X, %p, %u);
\n
"
,
hWaveIn
,
lpWaveInHdr
,
uSize
);
if
(
lpWaveInHdr
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
lpWaveInHdr
->
dwBytesRecorded
=
0
;
ret
=
MMSYSTDRV_Message
(
HWAVEIN_32
(
hWaveIn
),
WIDM_PREPARE
,
lpsegWaveInHdr
,
uSize
);
return
ret
;
return
MMSYSTDRV_Message
(
HWAVEIN_32
(
hWaveIn
),
WIDM_PREPARE
,
lpsegWaveInHdr
,
uSize
);
}
/**************************************************************************
...
...
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