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
3c640b8d
Commit
3c640b8d
authored
Sep 16, 2012
by
Jörg Höhle
Committed by
Alexandre Julliard
Oct 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciseq: Fix some MCIERROR_* codes (MCI_STATUS).
parent
c3842bc0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
mcimidi.c
dlls/mciseq/mcimidi.c
+11
-8
No files found.
dlls/mciseq/mcimidi.c
View file @
3c640b8d
...
...
@@ -1331,13 +1331,14 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
case
MCI_STATUS_LENGTH
:
if
((
dwFlags
&
MCI_TRACK
)
&&
wmm
->
wFormat
==
2
)
{
if
(
lpParms
->
dwTrack
>=
wmm
->
nTracks
)
return
MCIERR_
BAD_INTEGER
;
return
MCIERR_
OUTOFRANGE
;
/* FIXME: this is wrong if there is a tempo change inside the file */
lpParms
->
dwReturn
=
MIDI_ConvertPulseToMS
(
wmm
,
wmm
->
tracks
[
lpParms
->
dwTrack
].
dwLength
);
}
else
{
lpParms
->
dwReturn
=
MIDI_GetMThdLengthMS
(
wmm
);
}
lpParms
->
dwReturn
=
MIDI_ConvertMSToTimeFormat
(
wmm
,
lpParms
->
dwReturn
);
/* FIXME: ret = MCI_COLONIZED4_RETURN if SMPTE */
TRACE
(
"MCI_STATUS_LENGTH => %lu
\n
"
,
lpParms
->
dwReturn
);
break
;
case
MCI_STATUS_MODE
:
...
...
@@ -1355,9 +1356,10 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
TRACE
(
"MCI_STATUS_NUMBER_OF_TRACKS => %lu
\n
"
,
lpParms
->
dwReturn
);
break
;
case
MCI_STATUS_POSITION
:
/* FIXME:
do I need to use MCI_TRACK ?
*/
/* FIXME:
check MCI_TRACK == 1 if set
*/
lpParms
->
dwReturn
=
MIDI_ConvertMSToTimeFormat
(
wmm
,
(
dwFlags
&
MCI_STATUS_START
)
?
0
:
wmm
->
dwPositionMS
);
/* FIXME: ret = MCI_COLONIZED4_RETURN if SMPTE */
TRACE
(
"MCI_STATUS_POSITION %s => %lu
\n
"
,
(
dwFlags
&
MCI_STATUS_START
)
?
"start"
:
"current"
,
lpParms
->
dwReturn
);
break
;
...
...
@@ -1375,7 +1377,7 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
case
MCI_SEQ_STATUS_DIVTYPE
:
TRACE
(
"MCI_SEQ_STATUS_DIVTYPE !
\n
"
);
if
(
wmm
->
nDivision
>
0x8000
)
{
switch
(
wmm
->
nDivision
)
{
switch
(
HIBYTE
(
wmm
->
nDivision
)
)
{
case
0xE8
:
lpParms
->
dwReturn
=
MCI_SEQ_DIV_SMPTE_24
;
break
;
/* -24 */
case
0xE7
:
lpParms
->
dwReturn
=
MCI_SEQ_DIV_SMPTE_25
;
break
;
/* -25 */
case
0xE3
:
lpParms
->
dwReturn
=
MCI_SEQ_DIV_SMPTE_30DROP
;
break
;
/* -29 */
/* is the MCI constant correct ? */
...
...
@@ -1390,11 +1392,13 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
break
;
case
MCI_SEQ_STATUS_MASTER
:
TRACE
(
"MCI_SEQ_STATUS_MASTER !
\n
"
);
lpParms
->
dwReturn
=
0
;
lpParms
->
dwReturn
=
MAKEMCIRESOURCE
(
MCI_SEQ_NONE
,
MCI_SEQ_NONE_S
);
ret
=
MCI_RESOURCE_RETURNED
;
break
;
case
MCI_SEQ_STATUS_SLAVE
:
TRACE
(
"MCI_SEQ_STATUS_SLAVE !
\n
"
);
lpParms
->
dwReturn
=
0
;
lpParms
->
dwReturn
=
MAKEMCIRESOURCE
(
MCI_SEQ_FILE
,
MCI_SEQ_FILE_S
);
ret
=
MCI_RESOURCE_RETURNED
;
break
;
case
MCI_SEQ_STATUS_OFFSET
:
TRACE
(
"MCI_SEQ_STATUS_OFFSET !
\n
"
);
...
...
@@ -1415,11 +1419,10 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
break
;
default:
FIXME
(
"Unknown command %08X !
\n
"
,
lpParms
->
dwItem
);
return
MCIERR_UN
RECOGNIZED_COMMAND
;
return
MCIERR_UN
SUPPORTED_FUNCTION
;
}
}
else
{
WARN
(
"No Status-Item!
\n
"
);
return
MCIERR_UNRECOGNIZED_COMMAND
;
return
MCIERR_MISSING_PARAMETER
;
}
if
((
dwFlags
&
MCI_NOTIFY
)
&&
HRESULT_CODE
(
ret
)
==
0
)
MIDI_mciNotify
(
lpParms
->
dwCallback
,
wmm
,
MCI_NOTIFY_SUCCESSFUL
);
...
...
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