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
2f86a5d6
Commit
2f86a5d6
authored
Dec 15, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime/tests: Allow small time variation in test_performance_time.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55637
parent
6447b11b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
dmime.c
dlls/dmime/tests/dmime.c
+6
-1
No files found.
dlls/dmime/tests/dmime.c
View file @
2f86a5d6
...
@@ -65,6 +65,11 @@ static double scale_music_time(MUSIC_TIME time, double tempo)
...
@@ -65,6 +65,11 @@ static double scale_music_time(MUSIC_TIME time, double tempo)
return
(
600000000
.
0
*
time
)
/
(
tempo
*
DMUS_PPQ
);
return
(
600000000
.
0
*
time
)
/
(
tempo
*
DMUS_PPQ
);
}
}
static
MUSIC_TIME
music_time_from_reference
(
REFERENCE_TIME
time
,
double
tempo
)
{
return
(
time
*
tempo
*
DMUS_PPQ
)
/
600000000
;
}
#define check_dmus_note_pmsg(a, b, c, d, e, f, g) check_dmus_note_pmsg_(__LINE__, a, b, c, d, e, f, g)
#define check_dmus_note_pmsg(a, b, c, d, e, f, g) check_dmus_note_pmsg_(__LINE__, a, b, c, d, e, f, g)
static
void
check_dmus_note_pmsg_
(
int
line
,
DMUS_NOTE_PMSG
*
msg
,
MUSIC_TIME
time
,
UINT
chan
,
static
void
check_dmus_note_pmsg_
(
int
line
,
DMUS_NOTE_PMSG
*
msg
,
MUSIC_TIME
time
,
UINT
chan
,
UINT
duration
,
UINT
key
,
UINT
vel
,
UINT
flags
)
UINT
duration
,
UINT
key
,
UINT
vel
,
UINT
flags
)
...
@@ -2896,7 +2901,7 @@ static void test_performance_time(void)
...
@@ -2896,7 +2901,7 @@ static void test_performance_time(void)
hr
=
IDirectMusicPerformance_GetTime
(
performance
,
&
time
,
&
music_time
);
hr
=
IDirectMusicPerformance_GetTime
(
performance
,
&
time
,
&
music_time
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
time
-
init_time
<=
200
*
10000
,
"got %I64d
\n
"
,
time
-
init_time
);
ok
(
time
-
init_time
<=
200
*
10000
,
"got %I64d
\n
"
,
time
-
init_time
);
ok
(
music_time
==
(
time
-
init_time
)
/
6510
,
"got %ld
\n
"
,
music_time
);
ok
(
abs
(
music_time
-
music_time_from_reference
(
time
-
init_time
,
120
))
<=
1
,
"got %ld
\n
"
,
music_time
);
hr
=
IDirectMusicPerformance_CloseDown
(
performance
);
hr
=
IDirectMusicPerformance_CloseDown
(
performance
);
...
...
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