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
6ccb6639
Commit
6ccb6639
authored
Jul 13, 2007
by
Emmanuel Maillard
Committed by
Alexandre Julliard
Jul 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: MIDIIn_MessageHandler: Fix non-SysEx messages parsing.
parent
f203ed94
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
midi.c
dlls/winecoreaudio.drv/midi.c
+25
-8
No files found.
dlls/winecoreaudio.drv/midi.c
View file @
6ccb6639
...
...
@@ -851,6 +851,8 @@ static CFDataRef MIDIIn_MessageHandler(CFMessagePortRef local, SInt32 msgid, CFD
int
i
=
0
;
MIDISource
*
src
=
NULL
;
DWORD
sendData
=
0
;
int
pos
=
0
;
DWORD
currentTime
;
switch
(
msgid
)
{
...
...
@@ -886,17 +888,32 @@ static CFDataRef MIDIIn_MessageHandler(CFMessagePortRef local, SInt32 msgid, CFD
goto
done
;
}
EnterCriticalSection
(
&
midiInLock
);
if
(
msg
->
length
==
3
)
currentTime
=
GetTickCount
()
-
src
->
startTime
;
while
(
pos
<
msg
->
length
)
{
sendData
=
(
msg
->
data
[
2
]
<<
16
)
|
(
msg
->
data
[
1
]
<<
8
)
|
(
msg
->
data
[
0
]
<<
0
);
}
if
(
msg
->
length
==
2
)
sendData
=
0
;
switch
(
msg
->
data
[
pos
]
&
0xF0
)
{
sendData
=
(
msg
->
data
[
1
]
<<
8
)
|
(
msg
->
data
[
0
]
<<
0
);
case
0xF0
:
sendData
=
(
msg
->
data
[
pos
]
<<
0
);
pos
++
;
break
;
case
0xC0
:
case
0xD0
:
sendData
=
(
msg
->
data
[
pos
+
1
]
<<
8
)
|
(
msg
->
data
[
pos
]
<<
0
);
pos
+=
2
;
break
;
default:
sendData
=
(
msg
->
data
[
pos
+
2
]
<<
16
)
|
(
msg
->
data
[
pos
+
1
]
<<
8
)
|
(
msg
->
data
[
pos
]
<<
0
);
pos
+=
3
;
break
;
}
MIDI_NotifyClient
(
msg
->
devID
,
MIM_DATA
,
sendData
,
currentTime
);
}
MIDI_NotifyClient
(
msg
->
devID
,
MIM_DATA
,
sendData
,
GetTickCount
()
-
src
->
startTime
);
LeaveCriticalSection
(
&
midiInLock
);
break
;
default:
...
...
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