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
9d9c6431
Commit
9d9c6431
authored
Jul 19, 2004
by
Francois Gouget
Committed by
Alexandre Julliard
Jul 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In interactive mode, check that the tone duration is within 10% of the
expected value.
parent
5c60510b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
wave.c
dlls/winmm/tests/wave.c
+7
-0
No files found.
dlls/winmm/tests/wave.c
View file @
9d9c6431
...
...
@@ -306,6 +306,7 @@ static void wave_out_test_deviceOut(int device, double duration, LPWAVEFORMATEX
"waveOutPrepareHeader: device=%s rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
if
(
winetest_interactive
&&
rc
==
MMSYSERR_NOERROR
)
{
DWORD
start
,
end
;
trace
(
"Playing %g second 440Hz tone at %5ldx%2dx%d %s
\n
"
,
duration
,
pwfx
->
nSamplesPerSec
,
pwfx
->
wBitsPerSample
,
pwfx
->
nChannels
,
flags
&
WAVE_FORMAT_DIRECT
?
"WAVE_FORMAT_DIRECT"
:
...
...
@@ -314,10 +315,16 @@ static void wave_out_test_deviceOut(int device, double duration, LPWAVEFORMATEX
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutSetVolume: device=%s rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
WaitForSingleObject
(
hevent
,
INFINITE
);
start
=
GetTickCount
();
rc
=
waveOutWrite
(
wout
,
&
frag
,
sizeof
(
frag
));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutWrite: device=%s rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
WaitForSingleObject
(
hevent
,
INFINITE
);
/* Check the sound duration was within 10% of the expected value */
end
=
GetTickCount
();
trace
(
"sound duration=%ld
\n
"
,
end
-
start
);
ok
(
fabs
(
1000
*
duration
-
end
+
start
)
<=
100
*
duration
,
"The sound played for %ld ms instead of %g ms
\n
"
,
end
-
start
,
1000
*
duration
);
rc
=
waveOutSetVolume
(
wout
,
volume
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutSetVolume: device=%s rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
...
...
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