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
Danyil Blyschak
wine
Commits
3930b756
Commit
3930b756
authored
17 years ago
by
Emmanuel Maillard
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
winecoreaudio: Implement MIDIIn_Open and MIDIIn_Close.
parent
efd18eed
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
+61
-0
61 additions, 0 deletions
dlls/winecoreaudio.drv/midi.c
with
61 additions
and
0 deletions
dlls/winecoreaudio.drv/midi.c
+
61
−
0
View file @
3930b756
...
...
@@ -594,6 +594,65 @@ static DWORD MIDIOut_Reset(WORD wDevID)
return
MMSYSERR_NOERROR
;
}
static
DWORD
MIDIIn_Open
(
WORD
wDevID
,
LPMIDIOPENDESC
lpDesc
,
DWORD
dwFlags
)
{
TRACE
(
"wDevID=%d lpDesc=%p dwFlags=%08x
\n
"
,
wDevID
,
lpDesc
,
dwFlags
);
if
(
lpDesc
==
NULL
)
{
WARN
(
"Invalid Parameter
\n
"
);
return
MMSYSERR_INVALPARAM
;
}
if
(
wDevID
>=
MIDIIn_NumDevs
)
{
WARN
(
"bad device ID : %d
\n
"
,
wDevID
);
return
MMSYSERR_BADDEVICEID
;
}
if
(
sources
[
wDevID
].
midiDesc
.
hMidi
!=
0
)
{
WARN
(
"device already open !
\n
"
);
return
MMSYSERR_ALLOCATED
;
}
if
((
dwFlags
&
MIDI_IO_STATUS
)
!=
0
)
{
WARN
(
"No support for MIDI_IO_STATUS in dwFlags yet, ignoring it
\n
"
);
dwFlags
&=
~
MIDI_IO_STATUS
;
}
if
((
dwFlags
&
~
CALLBACK_TYPEMASK
)
!=
0
)
{
FIXME
(
"Bad dwFlags
\n
"
);
return
MMSYSERR_INVALFLAG
;
}
sources
[
wDevID
].
wFlags
=
HIWORD
(
dwFlags
&
CALLBACK_TYPEMASK
);
sources
[
wDevID
].
lpQueueHdr
=
NULL
;
sources
[
wDevID
].
midiDesc
=
*
lpDesc
;
sources
[
wDevID
].
startTime
=
0
;
sources
[
wDevID
].
state
=
0
;
return
MIDI_NotifyClient
(
wDevID
,
MIM_OPEN
,
0L
,
0L
);
}
static
DWORD
MIDIIn_Close
(
WORD
wDevID
)
{
DWORD
ret
=
MMSYSERR_NOERROR
;
TRACE
(
"wDevID=%d
\n
"
,
wDevID
);
if
(
wDevID
>=
MIDIIn_NumDevs
)
{
WARN
(
"bad device ID : %d
\n
"
,
wDevID
);
return
MMSYSERR_BADDEVICEID
;
}
if
(
sources
[
wDevID
].
midiDesc
.
hMidi
==
0
)
{
WARN
(
"device not opened !
\n
"
);
return
MMSYSERR_ERROR
;
}
if
(
sources
[
wDevID
].
lpQueueHdr
!=
0
)
{
return
MIDIERR_STILLPLAYING
;
}
ret
=
MIDI_NotifyClient
(
wDevID
,
MIM_CLOSE
,
0L
,
0L
);
sources
[
wDevID
].
midiDesc
.
hMidi
=
0
;
return
ret
;
}
/*
* MIDI In Mach message handling
*/
...
...
@@ -717,7 +776,9 @@ DWORD WINAPI CoreAudio_midMessage(UINT wDevID, UINT wMsg, DWORD dwUser, DWORD dw
case
DRVM_DISABLE
:
return
0
;
case
MIDM_OPEN
:
return
MIDIIn_Open
(
wDevID
,
(
LPMIDIOPENDESC
)
dwParam1
,
dwParam2
);
case
MIDM_CLOSE
:
return
MIDIIn_Close
(
wDevID
);
case
MIDM_ADDBUFFER
:
case
MIDM_PREPARE
:
case
MIDM_UNPREPARE
:
...
...
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