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
a8c252a6
Commit
a8c252a6
authored
Mar 14, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Mar 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciseq: MCI Set Port allows to select the MIDI device.
parent
33d1e593
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
mcimidi.c
dlls/mciseq/mcimidi.c
+22
-8
No files found.
dlls/mciseq/mcimidi.c
View file @
a8c252a6
...
...
@@ -62,6 +62,7 @@ typedef struct tagWINE_MCIMIDI {
UINT
wDevID
;
/* the MCI one */
HMIDI
hMidi
;
int
nUseCount
;
/* Incremented for each shared open */
WORD
wPort
;
/* the WINMM device unit */
WORD
wNotifyDeviceID
;
/* MCI device ID with a pending notification */
HANDLE
hCallback
;
/* Callback handle for pending notification */
HMMIO
hFile
;
/* mmio file handle open as Element */
...
...
@@ -726,6 +727,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpParms)
wmm
->
hFile
=
0
;
wmm
->
hMidi
=
0
;
wmm
->
wPort
=
MIDI_MAPPER
;
wmm
->
lpstrElementName
=
NULL
;
dwDeviceID
=
lpParms
->
wDeviceID
;
...
...
@@ -962,8 +964,8 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
MIDI_mciReadNextEvent
(
wmm
,
mmt
);
/* FIXME == 0 */
}
dwRet
=
midiOutOpen
((
LPHMIDIOUT
)
&
wmm
->
hMidi
,
MIDIMAPPER
,
0L
,
0L
,
CALLBACK_NULL
);
/* dwRet = midiInOpen(&wmm->hMidi,
MIDIMAPPER
, 0L, 0L, CALLBACK_NULL);*/
dwRet
=
midiOutOpen
((
LPHMIDIOUT
)
&
wmm
->
hMidi
,
wmm
->
wPort
,
0L
,
0L
,
CALLBACK_NULL
);
/* dwRet = midiInOpen(&wmm->hMidi,
wmm->wPort
, 0L, 0L, CALLBACK_NULL);*/
if
(
dwRet
!=
MMSYSERR_NOERROR
)
{
return
dwRet
;
}
...
...
@@ -1290,7 +1292,7 @@ static DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa
/**************************************************************************
* MIDI_mciSet [internal]
*/
static
DWORD
MIDI_mciSet
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_SET_PARMS
lpParms
)
static
DWORD
MIDI_mciSet
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_SE
Q_SE
T_PARMS
lpParms
)
{
WINE_MCIMIDI
*
wmm
=
MIDI_mciGetOpenDev
(
wDevID
);
...
...
@@ -1359,8 +1361,15 @@ static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
TRACE
(
"MCI_SEQ_SET_SLAVE !
\n
"
);
if
(
dwFlags
&
MCI_SEQ_SET_OFFSET
)
TRACE
(
"MCI_SEQ_SET_OFFSET !
\n
"
);
if
(
dwFlags
&
MCI_SEQ_SET_PORT
)
TRACE
(
"MCI_SEQ_SET_PORT !
\n
"
);
if
(
dwFlags
&
MCI_SEQ_SET_PORT
)
{
TRACE
(
"MCI_SEQ_SET_PORT = %d
\n
"
,
lpParms
->
dwPort
);
if
((
UINT16
)
lpParms
->
dwPort
!=
(
UINT16
)
MIDI_MAPPER
&&
(
UINT16
)
lpParms
->
dwPort
>=
midiOutGetNumDevs
())
/* FIXME: input/output port distinction? */
return
MCIERR_SEQ_PORT_NONEXISTENT
;
/* FIXME: Native manages to swap the device while playing! */
wmm
->
wPort
=
lpParms
->
dwPort
;
}
if
(
dwFlags
&
MCI_SEQ_SET_TEMPO
)
TRACE
(
"MCI_SEQ_SET_TEMPO !
\n
"
);
return
0
;
...
...
@@ -1459,8 +1468,13 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
lpParms
->
dwReturn
=
0
;
break
;
case
MCI_SEQ_STATUS_PORT
:
TRACE
(
"MCI_SEQ_STATUS_PORT (%u)!
\n
"
,
wmm
->
wDevID
);
lpParms
->
dwReturn
=
MIDI_MAPPER
;
if
(
wmm
->
wPort
!=
(
UINT16
)
MIDI_MAPPER
)
lpParms
->
dwReturn
=
wmm
->
wPort
;
else
{
lpParms
->
dwReturn
=
MAKEMCIRESOURCE
(
MIDI_MAPPER
,
MCI_SEQ_MAPPER_S
);
ret
=
MCI_RESOURCE_RETURNED
;
}
TRACE
(
"MCI_SEQ_STATUS_PORT (%u) => %d
\n
"
,
wmm
->
wDevID
,
wmm
->
wPort
);
break
;
case
MCI_SEQ_STATUS_TEMPO
:
TRACE
(
"MCI_SEQ_STATUS_TEMPO !
\n
"
);
...
...
@@ -1664,7 +1678,7 @@ LRESULT CALLBACK MCIMIDI_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
case
MCI_PLAY
:
return
MIDI_mciPlay
(
dwDevID
,
dwParam1
,
(
LPMCI_PLAY_PARMS
)
dwParam2
);
case
MCI_RECORD
:
return
MIDI_mciRecord
(
dwDevID
,
dwParam1
,
(
LPMCI_RECORD_PARMS
)
dwParam2
);
case
MCI_STOP
:
return
MIDI_mciStop
(
dwDevID
,
dwParam1
,
(
LPMCI_GENERIC_PARMS
)
dwParam2
);
case
MCI_SET
:
return
MIDI_mciSet
(
dwDevID
,
dwParam1
,
(
LPMCI_SET_PARMS
)
dwParam2
);
case
MCI_SET
:
return
MIDI_mciSet
(
dwDevID
,
dwParam1
,
(
LPMCI_SE
Q_SE
T_PARMS
)
dwParam2
);
case
MCI_PAUSE
:
return
MIDI_mciPause
(
dwDevID
,
dwParam1
,
(
LPMCI_GENERIC_PARMS
)
dwParam2
);
case
MCI_RESUME
:
return
MIDI_mciResume
(
dwDevID
,
dwParam1
,
(
LPMCI_GENERIC_PARMS
)
dwParam2
);
case
MCI_STATUS
:
return
MIDI_mciStatus
(
dwDevID
,
dwParam1
,
(
LPMCI_STATUS_PARMS
)
dwParam2
);
...
...
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