Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cqwrteur
wine
Commits
945588a3
Commit
945588a3
authored
14 years ago
by
Jörg Höhle
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
winecoreaudio: Ignore failure to notify MIDI clients.
parent
abf29377
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/winecoreaudio.drv/midi.c
+12
-19
12 additions, 19 deletions
dlls/winecoreaudio.drv/midi.c
with
12 additions
and
19 deletions
dlls/winecoreaudio.drv/midi.c
+
12
−
19
View file @
945588a3
...
...
@@ -222,7 +222,7 @@ LONG CoreAudio_MIDIRelease(void)
/**************************************************************************
* MIDI_NotifyClient [internal]
*/
static
DWORD
MIDI_NotifyClient
(
UINT
wDevID
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
static
void
MIDI_NotifyClient
(
UINT
wDevID
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
DWORD
dwCallBack
;
UINT
uFlags
;
...
...
@@ -255,12 +255,11 @@ static DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg, DWORD dwParam1, DWORD dwP
dwInstance
=
sources
[
wDevID
].
midiDesc
.
dwInstance
;
break
;
default:
WARN
(
"Unsupported MSW-MIDI message %u
\n
"
,
wMsg
);
return
MMSYSERR_ERROR
;
ERR
(
"Unsupported MSW-MIDI message %u
\n
"
,
wMsg
);
return
;
}
return
DriverCallback
(
dwCallBack
,
uFlags
,
hDev
,
wMsg
,
dwInstance
,
dwParam1
,
dwParam2
)
?
MMSYSERR_NOERROR
:
MMSYSERR_ERROR
;
DriverCallback
(
dwCallBack
,
uFlags
,
hDev
,
wMsg
,
dwInstance
,
dwParam1
,
dwParam2
);
}
static
DWORD
MIDIOut_Open
(
WORD
wDevID
,
LPMIDIOPENDESC
lpDesc
,
DWORD
dwFlags
)
...
...
@@ -307,7 +306,8 @@ static DWORD MIDIOut_Open(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
dest
->
wFlags
=
HIWORD
(
dwFlags
&
CALLBACK_TYPEMASK
);
dest
->
midiDesc
=
*
lpDesc
;
return
MIDI_NotifyClient
(
wDevID
,
MOM_OPEN
,
0L
,
0L
);
MIDI_NotifyClient
(
wDevID
,
MOM_OPEN
,
0L
,
0L
);
return
MMSYSERR_NOERROR
;
}
static
DWORD
MIDIOut_Close
(
WORD
wDevID
)
...
...
@@ -327,10 +327,7 @@ static DWORD MIDIOut_Close(WORD wDevID)
destinations
[
wDevID
].
graph
=
0
;
destinations
[
wDevID
].
synth
=
0
;
if
(
MIDI_NotifyClient
(
wDevID
,
MOM_CLOSE
,
0L
,
0L
)
!=
MMSYSERR_NOERROR
)
{
WARN
(
"can't notify client !
\n
"
);
ret
=
MMSYSERR_INVALPARAM
;
}
MIDI_NotifyClient
(
wDevID
,
MOM_CLOSE
,
0L
,
0L
);
destinations
[
wDevID
].
midiDesc
.
hMidi
=
0
;
return
ret
;
...
...
@@ -446,10 +443,7 @@ static DWORD MIDIOut_LongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
lpMidiHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
lpMidiHdr
->
dwFlags
|=
MHDR_DONE
;
if
(
MIDI_NotifyClient
(
wDevID
,
MOM_DONE
,
(
DWORD
)
lpMidiHdr
,
0L
)
!=
MMSYSERR_NOERROR
)
{
WARN
(
"can't notify client !
\n
"
);
return
MMSYSERR_INVALPARAM
;
}
MIDI_NotifyClient
(
wDevID
,
MOM_DONE
,
(
DWORD
)
lpMidiHdr
,
0L
);
return
MMSYSERR_NOERROR
;
}
...
...
@@ -632,7 +626,8 @@ static DWORD MIDIIn_Open(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
sources
[
wDevID
].
startTime
=
0
;
sources
[
wDevID
].
state
=
0
;
return
MIDI_NotifyClient
(
wDevID
,
MIM_OPEN
,
0L
,
0L
);
MIDI_NotifyClient
(
wDevID
,
MIM_OPEN
,
0L
,
0L
);
return
MMSYSERR_NOERROR
;
}
static
DWORD
MIDIIn_Close
(
WORD
wDevID
)
...
...
@@ -654,7 +649,7 @@ static DWORD MIDIIn_Close(WORD wDevID)
return
MIDIERR_STILLPLAYING
;
}
ret
=
MIDI_NotifyClient
(
wDevID
,
MIM_CLOSE
,
0L
,
0L
);
MIDI_NotifyClient
(
wDevID
,
MIM_CLOSE
,
0L
,
0L
);
sources
[
wDevID
].
midiDesc
.
hMidi
=
0
;
return
ret
;
}
...
...
@@ -814,9 +809,7 @@ static DWORD MIDIIn_Reset(WORD wDevID)
sources
[
wDevID
].
lpQueueHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
sources
[
wDevID
].
lpQueueHdr
->
dwFlags
|=
MHDR_DONE
;
/* FIXME: when called from 16 bit, lpQueueHdr needs to be a segmented ptr */
if
(
MIDI_NotifyClient
(
wDevID
,
MIM_LONGDATA
,
(
DWORD
)
sources
[
wDevID
].
lpQueueHdr
,
dwTime
)
!=
MMSYSERR_NOERROR
)
{
WARN
(
"Couldn't notify client
\n
"
);
}
MIDI_NotifyClient
(
wDevID
,
MIM_LONGDATA
,
(
DWORD
)
sources
[
wDevID
].
lpQueueHdr
,
dwTime
);
sources
[
wDevID
].
lpQueueHdr
=
(
LPMIDIHDR
)
sources
[
wDevID
].
lpQueueHdr
->
lpNext
;
}
LeaveCriticalSection
(
&
midiInLock
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment