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
bdf75783
Commit
bdf75783
authored
Jan 31, 2012
by
Jörg Höhle
Committed by
Alexandre Julliard
Jan 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciwave: Always reach an end position expressed in milliseconds.
parent
f489cc97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
mciwave.c
dlls/mciwave/mciwave.c
+6
-5
No files found.
dlls/mciwave/mciwave.c
View file @
bdf75783
...
@@ -225,7 +225,7 @@ static void WAVE_mciNotify(DWORD_PTR hWndCallBack, WINE_MCIWAVE* wmw, UINT wStat
...
@@ -225,7 +225,7 @@ static void WAVE_mciNotify(DWORD_PTR hWndCallBack, WINE_MCIWAVE* wmw, UINT wStat
/**************************************************************************
/**************************************************************************
* WAVE_ConvertByteToTimeFormat [internal]
* WAVE_ConvertByteToTimeFormat [internal]
*/
*/
static
DWORD
WAVE_ConvertByteToTimeFormat
(
WINE_MCIWAVE
*
wmw
,
DWORD
val
,
LPDWORD
lpRet
)
static
DWORD
WAVE_ConvertByteToTimeFormat
(
WINE_MCIWAVE
*
wmw
,
DWORD
val
)
{
{
DWORD
ret
=
0
;
DWORD
ret
=
0
;
...
@@ -243,7 +243,6 @@ static DWORD WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE* wmw, DWORD val, LPDWORD
...
@@ -243,7 +243,6 @@ static DWORD WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE* wmw, DWORD val, LPDWORD
WARN
(
"Bad time format %u!
\n
"
,
wmw
->
dwMciTimeFormat
);
WARN
(
"Bad time format %u!
\n
"
,
wmw
->
dwMciTimeFormat
);
}
}
TRACE
(
"val=%u=0x%08x [tf=%u] => ret=%u
\n
"
,
val
,
val
,
wmw
->
dwMciTimeFormat
,
ret
);
TRACE
(
"val=%u=0x%08x [tf=%u] => ret=%u
\n
"
,
val
,
val
,
wmw
->
dwMciTimeFormat
,
ret
);
*
lpRet
=
0
;
return
ret
;
return
ret
;
}
}
...
@@ -257,6 +256,9 @@ static DWORD WAVE_ConvertTimeFormatToByte(WINE_MCIWAVE* wmw, DWORD val)
...
@@ -257,6 +256,9 @@ static DWORD WAVE_ConvertTimeFormatToByte(WINE_MCIWAVE* wmw, DWORD val)
switch
(
wmw
->
dwMciTimeFormat
)
{
switch
(
wmw
->
dwMciTimeFormat
)
{
case
MCI_FORMAT_MILLISECONDS
:
case
MCI_FORMAT_MILLISECONDS
:
ret
=
MulDiv
(
val
,
wmw
->
lpWaveFormat
->
nAvgBytesPerSec
,
1000
);
ret
=
MulDiv
(
val
,
wmw
->
lpWaveFormat
->
nAvgBytesPerSec
,
1000
);
if
(
ret
>
wmw
->
ckWaveData
.
cksize
&&
val
==
WAVE_ConvertByteToTimeFormat
(
wmw
,
wmw
->
ckWaveData
.
cksize
))
ret
=
wmw
->
ckWaveData
.
cksize
;
break
;
break
;
case
MCI_FORMAT_BYTES
:
case
MCI_FORMAT_BYTES
:
ret
=
val
;
ret
=
val
;
...
@@ -1484,7 +1486,7 @@ static DWORD WAVE_mciStatus(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_STATUS_PARM
...
@@ -1484,7 +1486,7 @@ static DWORD WAVE_mciStatus(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_STATUS_PARM
return
MCIERR_UNSUPPORTED_FUNCTION
;
return
MCIERR_UNSUPPORTED_FUNCTION
;
}
}
/* only one track in file is currently handled, so don't take care of MCI_TRACK flag */
/* only one track in file is currently handled, so don't take care of MCI_TRACK flag */
lpParms
->
dwReturn
=
WAVE_ConvertByteToTimeFormat
(
wmw
,
wmw
->
ckWaveData
.
cksize
,
&
ret
);
lpParms
->
dwReturn
=
WAVE_ConvertByteToTimeFormat
(
wmw
,
wmw
->
ckWaveData
.
cksize
);
TRACE
(
"MCI_STATUS_LENGTH => %lu
\n
"
,
lpParms
->
dwReturn
);
TRACE
(
"MCI_STATUS_LENGTH => %lu
\n
"
,
lpParms
->
dwReturn
);
break
;
break
;
case
MCI_STATUS_MODE
:
case
MCI_STATUS_MODE
:
...
@@ -1509,8 +1511,7 @@ static DWORD WAVE_mciStatus(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_STATUS_PARM
...
@@ -1509,8 +1511,7 @@ static DWORD WAVE_mciStatus(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_STATUS_PARM
}
}
/* only one track in file is currently handled, so don't take care of MCI_TRACK flag */
/* only one track in file is currently handled, so don't take care of MCI_TRACK flag */
lpParms
->
dwReturn
=
WAVE_ConvertByteToTimeFormat
(
wmw
,
lpParms
->
dwReturn
=
WAVE_ConvertByteToTimeFormat
(
wmw
,
(
dwFlags
&
MCI_STATUS_START
)
?
0
:
wmw
->
dwPosition
,
(
dwFlags
&
MCI_STATUS_START
)
?
0
:
wmw
->
dwPosition
);
&
ret
);
TRACE
(
"MCI_STATUS_POSITION %s => %lu
\n
"
,
TRACE
(
"MCI_STATUS_POSITION %s => %lu
\n
"
,
(
dwFlags
&
MCI_STATUS_START
)
?
"start"
:
"current"
,
lpParms
->
dwReturn
);
(
dwFlags
&
MCI_STATUS_START
)
?
"start"
:
"current"
,
lpParms
->
dwReturn
);
break
;
break
;
...
...
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