Use round() instead of ceil() in wodGetPosition(TIME_SMPTE).
Fixes the corresponding winmm conformance test.
This commit is contained in:
parent
3ce9c5f4b8
commit
54751b230d
|
@ -1873,7 +1873,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
|||
time -= lpTime->u.smpte.min * 60;
|
||||
lpTime->u.smpte.sec = time;
|
||||
time -= lpTime->u.smpte.sec;
|
||||
lpTime->u.smpte.frame = ceil(time * 30);
|
||||
lpTime->u.smpte.frame = round(time * 30);
|
||||
lpTime->u.smpte.fps = 30;
|
||||
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
|
||||
lpTime->u.smpte.hour, lpTime->u.smpte.min,
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
/*#define EMULATE_SB16*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1427,7 +1428,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
|||
time -= lpTime->u.smpte.min * 60;
|
||||
lpTime->u.smpte.sec = time;
|
||||
time -= lpTime->u.smpte.sec;
|
||||
lpTime->u.smpte.frame = ceil(time * 30);
|
||||
lpTime->u.smpte.frame = round(time * 30);
|
||||
lpTime->u.smpte.fps = 30;
|
||||
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
|
||||
lpTime->u.smpte.hour, lpTime->u.smpte.min,
|
||||
|
|
|
@ -1121,7 +1121,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
|||
time -= lpTime->u.smpte.min * 60;
|
||||
lpTime->u.smpte.sec = time;
|
||||
time -= lpTime->u.smpte.sec;
|
||||
lpTime->u.smpte.frame = ceil(time * 30);
|
||||
lpTime->u.smpte.frame = round(time * 30);
|
||||
lpTime->u.smpte.fps = 30;
|
||||
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
|
||||
lpTime->u.smpte.hour, lpTime->u.smpte.min,
|
||||
|
|
|
@ -1591,7 +1591,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
|||
time -= lpTime->u.smpte.min * 60;
|
||||
lpTime->u.smpte.sec = time;
|
||||
time -= lpTime->u.smpte.sec;
|
||||
lpTime->u.smpte.frame = ceil(time * 30);
|
||||
lpTime->u.smpte.frame = round(time * 30);
|
||||
lpTime->u.smpte.fps = 30;
|
||||
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
|
||||
lpTime->u.smpte.hour, lpTime->u.smpte.min,
|
||||
|
|
|
@ -1165,7 +1165,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
|||
time -= lpTime->u.smpte.min * 60;
|
||||
lpTime->u.smpte.sec = time;
|
||||
time -= lpTime->u.smpte.sec;
|
||||
lpTime->u.smpte.frame = ceil(time * 30);
|
||||
lpTime->u.smpte.frame = round(time * 30);
|
||||
lpTime->u.smpte.fps = 30;
|
||||
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
|
||||
lpTime->u.smpte.hour, lpTime->u.smpte.min,
|
||||
|
|
|
@ -2123,7 +2123,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
|||
time -= lpTime->u.smpte.min * 60;
|
||||
lpTime->u.smpte.sec = time;
|
||||
time -= lpTime->u.smpte.sec;
|
||||
lpTime->u.smpte.frame = ceil(time * 30);
|
||||
lpTime->u.smpte.frame = round(time * 30);
|
||||
lpTime->u.smpte.fps = 30;
|
||||
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
|
||||
lpTime->u.smpte.hour, lpTime->u.smpte.min,
|
||||
|
|
Loading…
Reference in New Issue