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
c0d6db39
Commit
c0d6db39
authored
Mar 09, 2011
by
Jörg Höhle
Committed by
Alexandre Julliard
Mar 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Do not access MIDIHDR past notification callback.
parent
a1a2de18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
midi.c
dlls/winecoreaudio.drv/midi.c
+7
-6
No files found.
dlls/winecoreaudio.drv/midi.c
View file @
c0d6db39
...
...
@@ -694,8 +694,8 @@ static DWORD MIDIIn_AddBuffer(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
LPMIDIHDR
ptr
;
for
(
ptr
=
sources
[
wDevID
].
lpQueueHdr
;
ptr
->
lpNext
!=
0
;
ptr
=
(
LPMIDIHDR
)
ptr
->
lpNext
);
ptr
->
lpNext
=
(
struct
midihdr_tag
*
)
lpMidiHdr
;
ptr
=
ptr
->
lpNext
);
ptr
->
lpNext
=
lpMidiHdr
;
}
LeaveCriticalSection
(
&
midiInLock
);
...
...
@@ -806,11 +806,12 @@ static DWORD MIDIIn_Reset(WORD wDevID)
EnterCriticalSection
(
&
midiInLock
);
while
(
sources
[
wDevID
].
lpQueueHdr
)
{
sources
[
wDevID
].
lpQueueHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
sources
[
wDevID
].
lpQueueHdr
->
dwFlags
|=
MHDR_DONE
;
LPMIDIHDR
lpMidiHdr
=
sources
[
wDevID
].
lpQueueHdr
;
sources
[
wDevID
].
lpQueueHdr
=
lpMidiHdr
->
lpNext
;
lpMidiHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
lpMidiHdr
->
dwFlags
|=
MHDR_DONE
;
/* FIXME: when called from 16 bit, lpQueueHdr needs to be a segmented ptr */
MIDI_NotifyClient
(
wDevID
,
MIM_LONGDATA
,
(
DWORD
)
sources
[
wDevID
].
lpQueueHdr
,
dwTime
);
sources
[
wDevID
].
lpQueueHdr
=
(
LPMIDIHDR
)
sources
[
wDevID
].
lpQueueHdr
->
lpNext
;
MIDI_NotifyClient
(
wDevID
,
MIM_LONGDATA
,
(
DWORD
)
lpMidiHdr
,
dwTime
);
}
LeaveCriticalSection
(
&
midiInLock
);
...
...
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