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
a45ffebe
Commit
a45ffebe
authored
Apr 24, 2007
by
Michał Wiernowolski
Committed by
Alexandre Julliard
Apr 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Improved handling of SysEx MIDI messages.
parent
73bec118
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
midi.c
dlls/winealsa.drv/midi.c
+6
-4
No files found.
dlls/winealsa.drv/midi.c
View file @
a45ffebe
...
@@ -351,17 +351,19 @@ static DWORD WINAPI midRecThread(LPVOID arg)
...
@@ -351,17 +351,19 @@ static DWORD WINAPI midRecThread(LPVOID arg)
LPBYTE
ptr
=
(
BYTE
*
)
ev
->
data
.
ext
.
ptr
;
LPBYTE
ptr
=
(
BYTE
*
)
ev
->
data
.
ext
.
ptr
;
LPMIDIHDR
lpMidiHdr
;
LPMIDIHDR
lpMidiHdr
;
/* FIXME: Should handle sysex greater tha
t a single buffer
*/
/* FIXME: Should handle sysex greater tha
n lpMidiHdr->dwBufferLength
*/
EnterCriticalSection
(
&
crit_sect
);
EnterCriticalSection
(
&
crit_sect
);
if
((
lpMidiHdr
=
MidiInDev
[
wDevID
].
lpQueueHdr
)
!=
NULL
)
{
if
((
lpMidiHdr
=
MidiInDev
[
wDevID
].
lpQueueHdr
)
!=
NULL
)
{
if
(
len
<=
lpMidiHdr
->
dwBufferLength
)
{
if
(
lpMidiHdr
->
dwBytesRecorded
+
len
<=
lpMidiHdr
->
dwBufferLength
)
{
lpMidiHdr
->
dwBytesRecorded
=
len
;
memcpy
(
lpMidiHdr
->
lpData
+
lpMidiHdr
->
dwBytesRecorded
,
ptr
,
len
);
memcpy
(
lpMidiHdr
->
lpData
,
ptr
,
len
);
lpMidiHdr
->
dwBytesRecorded
+=
len
;
if
(
*
(
ptr
+
(
len
-
1
))
==
0xF7
)
{
lpMidiHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
lpMidiHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
lpMidiHdr
->
dwFlags
|=
MHDR_DONE
;
lpMidiHdr
->
dwFlags
|=
MHDR_DONE
;
MidiInDev
[
wDevID
].
lpQueueHdr
=
(
LPMIDIHDR
)
lpMidiHdr
->
lpNext
;
MidiInDev
[
wDevID
].
lpQueueHdr
=
(
LPMIDIHDR
)
lpMidiHdr
->
lpNext
;
if
(
MIDI_NotifyClient
(
wDevID
,
MIM_LONGDATA
,
(
DWORD
)
lpMidiHdr
,
dwTime
)
!=
MMSYSERR_NOERROR
)
if
(
MIDI_NotifyClient
(
wDevID
,
MIM_LONGDATA
,
(
DWORD
)
lpMidiHdr
,
dwTime
)
!=
MMSYSERR_NOERROR
)
WARN
(
"Couldn't notify client
\n
"
);
WARN
(
"Couldn't notify client
\n
"
);
}
}
else
}
else
FIXME
(
"No enough space in the buffer to store sysex!
\n
"
);
FIXME
(
"No enough space in the buffer to store sysex!
\n
"
);
}
else
}
else
...
...
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