Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3930b756
Commit
3930b756
authored
Apr 26, 2007
by
Emmanuel Maillard
Committed by
Alexandre Julliard
Apr 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Implement MIDIIn_Open and MIDIIn_Close.
parent
efd18eed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
midi.c
dlls/winecoreaudio.drv/midi.c
+61
-0
No files found.
dlls/winecoreaudio.drv/midi.c
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
:
...
...
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