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
c3842bc0
Commit
c3842bc0
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: Correct MCI_SEEK return codes.
parent
6d6b2160
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
mcimidi.c
dlls/mciseq/mcimidi.c
+20
-20
No files found.
dlls/mciseq/mcimidi.c
View file @
c3842bc0
...
...
@@ -1541,32 +1541,32 @@ static DWORD MIDI_mciInfo(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_INFO_PARMSW lp
*/
static
DWORD
MIDI_mciSeek
(
WINE_MCIMIDI
*
wmm
,
DWORD
dwFlags
,
LPMCI_SEEK_PARMS
lpParms
)
{
DWORD
ret
=
0
;
DWORD
position
;
TRACE
(
"(%d, %08X, %p);
\n
"
,
wmm
->
wDevID
,
dwFlags
,
lpParms
);
if
(
lpParms
==
NULL
)
{
ret
=
MCIERR_NULL_PARAMETER_BLOCK
;
}
else
{
MIDI_mciStop
(
wmm
,
MCI_WAIT
,
0
);
if
(
dwFlags
&
MCI_SEEK_TO_START
)
{
wmm
->
dwPositionMS
=
0
;
}
else
if
(
dwFlags
&
MCI_SEEK_TO_END
)
{
wmm
->
dwPositionMS
=
0xFFFFFFFF
;
/* FIXME */
}
else
if
(
dwFlags
&
MCI_TO
)
{
wmm
->
dwPositionMS
=
MIDI_ConvertTimeFormatToMS
(
wmm
,
lpParms
->
dwTo
);
}
else
{
WARN
(
"dwFlag doesn't tell where to seek to...
\n
"
);
return
MCIERR_MISSING_PARAMETER
;
}
if
(
lpParms
==
NULL
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
TRACE
(
"Seeking to position=%u ms
\n
"
,
wmm
->
dwPositionMS
);
position
=
dwFlags
&
(
MCI_SEEK_TO_START
|
MCI_SEEK_TO_END
|
MCI_TO
);
if
(
!
position
)
return
MCIERR_MISSING_PARAMETER
;
if
(
position
&
(
position
-
1
))
return
MCIERR_FLAGS_NOT_COMPATIBLE
;
if
(
dwFlags
&
MCI_NOTIFY
)
MIDI_mciNotify
(
lpParms
->
dwCallback
,
wmm
,
MCI_NOTIFY_SUCCESSFUL
);
MIDI_mciStop
(
wmm
,
MCI_WAIT
,
0
);
if
(
dwFlags
&
MCI_TO
)
{
/* FIXME: compare with length */
wmm
->
dwPositionMS
=
MIDI_ConvertTimeFormatToMS
(
wmm
,
lpParms
->
dwTo
);
}
else
if
(
dwFlags
&
MCI_SEEK_TO_START
)
{
wmm
->
dwPositionMS
=
0
;
}
else
{
wmm
->
dwPositionMS
=
0xFFFFFFFF
;
/* FIXME */
}
return
ret
;
TRACE
(
"Seeking to position=%u ms
\n
"
,
wmm
->
dwPositionMS
);
if
(
dwFlags
&
MCI_NOTIFY
)
MIDI_mciNotify
(
lpParms
->
dwCallback
,
wmm
,
MCI_NOTIFY_SUCCESSFUL
);
return
0
;
}
/*======================================================================*
...
...
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