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
a956086e
Commit
a956086e
authored
Feb 16, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Feb 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: dwBytesRecorded controls how much is played, not dwBufferLength.
parent
7a38ecb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
winmm.c
dlls/winmm/winmm.c
+7
-4
No files found.
dlls/winmm/winmm.c
View file @
a956086e
...
...
@@ -1530,9 +1530,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%p dwB
ufferLength
=%u/%u dwFlags=0x%08x size=%lu]
\n
"
,
TRACE
(
"Adding %s lpMidiHdr=%p [lpData=0x%p dwB
ytesRecorded
=%u/%u dwFlags=0x%08x size=%lu]
\n
"
,
(
lpMidiHdr
->
dwFlags
&
MHDR_ISSTRM
)
?
"stream"
:
"regular"
,
lpMidiHdr
,
lpMidiHdr
,
lpMidiHdr
->
dwB
ufferLength
,
lpMidiHdr
->
dwBytesRecorded
,
lpMidiHdr
,
lpMidiHdr
->
dwB
ytesRecorded
,
lpMidiHdr
->
dwBufferLength
,
lpMidiHdr
->
dwFlags
,
msg
->
wParam
);
#if 0
/* dumps content of lpMidiHdr->lpData
...
...
@@ -1686,7 +1686,7 @@ static DWORD CALLBACK MMSYSTEM_MidiStream_Player(LPVOID pmt)
lpMidiHdr
->
dwOffset
+=
sizeof
(
MIDIEVENT
)
-
sizeof
(
me
->
dwParms
);
if
(
me
->
dwEvent
&
MEVT_F_LONG
)
lpMidiHdr
->
dwOffset
+=
(
MEVT_EVENTPARM
(
me
->
dwEvent
)
+
3
)
&
~
3
;
if
(
lpMidiHdr
->
dwOffset
>=
lpMidiHdr
->
dwB
ufferLength
)
{
if
(
lpMidiHdr
->
dwOffset
>=
lpMidiHdr
->
dwB
ytesRecorded
)
{
/* done with this header */
lpMidiHdr
->
dwFlags
|=
MHDR_DONE
;
lpMidiHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
...
...
@@ -1817,8 +1817,11 @@ MMRESULT WINAPI midiStreamOut(HMIDISTRM hMidiStrm, LPMIDIHDR lpMidiHdr,
TRACE
(
"(%p, %p, %u)!
\n
"
,
hMidiStrm
,
lpMidiHdr
,
cbMidiHdr
);
if
(
cbMidiHdr
<
sizeof
(
MIDIHDR
)
||
!
lpMidiHdr
||
!
lpMidiHdr
->
lpData
)
if
(
cbMidiHdr
<
sizeof
(
MIDIHDR
)
||
!
lpMidiHdr
||
!
lpMidiHdr
->
lpData
||
lpMidiHdr
->
dwBufferLength
<
lpMidiHdr
->
dwBytesRecorded
)
return
MMSYSERR_INVALPARAM
;
/* FIXME: Native additionaly checks if the MIDIEVENTs in lpData
* exactly fit dwBytesRecorded. */
if
(
!
(
lpMidiHdr
->
dwFlags
&
MHDR_PREPARED
))
return
MIDIERR_UNPREPARED
;
...
...
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