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
485390de
Commit
485390de
authored
Feb 05, 2004
by
Christian Costa
Committed by
Alexandre Julliard
Feb 05, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing notifications to MIDI_NotifyClient.
Made checks less strict in midPrepare, only return an error for buffer in queue. Fixed time of input events in Alsa driver.
parent
64851e16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
midi.c
dlls/winmm/winealsa/midi.c
+6
-3
midi.c
dlls/winmm/wineoss/midi.c
+5
-1
No files found.
dlls/winmm/winealsa/midi.c
View file @
485390de
...
...
@@ -173,6 +173,7 @@ static DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg,
case
MOM_OPEN
:
case
MOM_CLOSE
:
case
MOM_DONE
:
case
MOM_POSITIONCB
:
if
(
wDevID
>
MODM_NumDevs
)
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -185,7 +186,10 @@ static DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg,
case
MIM_OPEN
:
case
MIM_CLOSE
:
case
MIM_DATA
:
case
MIM_LONGDATA
:
case
MIM_ERROR
:
case
MIM_LONGERROR
:
case
MIM_MOREDATA
:
if
(
wDevID
>
MIDM_NumDevs
)
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -361,8 +365,7 @@ static VOID WINAPI midTimeCallback(HWND hwnd, UINT msg, UINT id, DWORD dwTime)
if
(
toSend
!=
0
)
{
TRACE
(
"Sending event %08lx (from %d %d)
\n
"
,
toSend
,
ev
->
source
.
client
,
ev
->
source
.
port
);
/* FIXME: Should use ev->time instead for better accuracy */
dwTime
-=
MidiInDev
[
wDevID
].
startTime
;
if
(
MIDI_NotifyClient
(
wDevID
,
MIM_DATA
,
toSend
,
dwTime
)
!=
MMSYSERR_NOERROR
)
{
if
(
MIDI_NotifyClient
(
wDevID
,
MIM_DATA
,
toSend
,
dwTime
-
MidiInDev
[
wDevID
].
startTime
)
!=
MMSYSERR_NOERROR
)
{
WARN
(
"Couldn't notify client
\n
"
);
}
}
...
...
@@ -547,7 +550,7 @@ static DWORD midPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
TRACE
(
"(%04X, %p, %08lX);
\n
"
,
wDevID
,
lpMidiHdr
,
dwSize
);
if
(
dwSize
<
sizeof
(
MIDIHDR
)
||
lpMidiHdr
==
0
||
lpMidiHdr
->
lpData
==
0
||
lpMidiHdr
->
dwFlags
!=
0
||
lpMidiHdr
->
lpData
==
0
||
(
lpMidiHdr
->
dwFlags
&
MHDR_INQUEUE
)
!=
0
||
lpMidiHdr
->
dwBufferLength
>=
0x10000ul
)
return
MMSYSERR_INVALPARAM
;
...
...
dlls/winmm/wineoss/midi.c
View file @
485390de
...
...
@@ -348,6 +348,7 @@ static DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg,
case
MOM_OPEN
:
case
MOM_CLOSE
:
case
MOM_DONE
:
case
MOM_POSITIONCB
:
if
(
wDevID
>
MODM_NumDevs
)
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -360,7 +361,10 @@ static DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg,
case
MIM_OPEN
:
case
MIM_CLOSE
:
case
MIM_DATA
:
case
MIM_LONGDATA
:
case
MIM_ERROR
:
case
MIM_LONGERROR
:
case
MIM_MOREDATA
:
if
(
wDevID
>
MIDM_NumDevs
)
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -771,7 +775,7 @@ static DWORD midPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
TRACE
(
"(%04X, %p, %08lX);
\n
"
,
wDevID
,
lpMidiHdr
,
dwSize
);
if
(
dwSize
<
sizeof
(
MIDIHDR
)
||
lpMidiHdr
==
0
||
lpMidiHdr
->
lpData
==
0
||
lpMidiHdr
->
dwFlags
!=
0
||
lpMidiHdr
->
lpData
==
0
||
(
lpMidiHdr
->
dwFlags
&
MHDR_INQUEUE
)
!=
0
||
lpMidiHdr
->
dwBufferLength
>=
0x10000ul
)
return
MMSYSERR_INVALPARAM
;
...
...
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