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
53a20f3a
Commit
53a20f3a
authored
May 20, 2004
by
Francois Gouget
Committed by
Alexandre Julliard
May 20, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a 5 second test tone to help debug issues with the tone duration
and help detect stutter issues. Add explanations describing the interactive test.
parent
ceeed96a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
wave.c
dlls/winmm/tests/wave.c
+13
-5
No files found.
dlls/winmm/tests/wave.c
View file @
53a20f3a
...
...
@@ -209,7 +209,7 @@ static const char * wave_out_caps(DWORD dwSupport)
#undef FLAG
}
static
void
wave_out_test_deviceOut
(
int
device
,
int
format
,
DWORD
flags
,
LPWAVEOUTCAPS
pcaps
)
static
void
wave_out_test_deviceOut
(
int
device
,
double
duration
,
int
format
,
DWORD
flags
,
LPWAVEOUTCAPS
pcaps
)
{
WAVEFORMATEX
wfx
;
HWAVEOUT
wout
;
...
...
@@ -253,7 +253,7 @@ static void wave_out_test_deviceOut(int device, int format, DWORD flags, LPWAVEO
wfx
.
nChannels
,
win_formats
[
format
][
1
],
win_formats
[
format
][
2
],
win_formats
[
format
][
3
]);
frag
.
lpData
=
wave_generate_la
(
&
wfx
,
1
.
0
,
&
frag
.
dwBufferLength
);
frag
.
lpData
=
wave_generate_la
(
&
wfx
,
duration
,
&
frag
.
dwBufferLength
);
frag
.
dwFlags
=
0
;
frag
.
dwLoops
=
0
;
...
...
@@ -265,7 +265,7 @@ static void wave_out_test_deviceOut(int device, int format, DWORD flags, LPWAVEO
"waveOutPrepareHeader: device=%d rc=%d
\n
"
,
device
,
rc
);
if
(
winetest_interactive
&&
rc
==
MMSYSERR_NOERROR
)
{
trace
(
"Playing
440Hz LA at %ldx%2dx%d %04lx
\n
"
,
trace
(
"Playing
%g second 440Hz tone at %ldx%2dx%d %04lx
\n
"
,
duration
,
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
,
flags
);
rc
=
waveOutSetVolume
(
wout
,
0x20002000
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutSetVolume: device=%d rc=%d
\n
"
,
device
,
rc
);
...
...
@@ -358,10 +358,18 @@ static void wave_out_tests()
caps
.
wChannels
,
caps
.
dwFormats
,
caps
.
dwSupport
,
wave_out_caps
(
caps
.
dwSupport
));
free
(
name
);
if
(
winetest_interactive
)
{
trace
(
"Playing a 5 seconds reference tone.
\n
"
);
trace
(
"All subsequent tones should be identical to this one.
\n
"
);
trace
(
"Listen for stutter, changes in pitch, volume, etc.
\n
"
);
wave_out_test_deviceOut
(
d
,
5
.
0
,
0
,
0
,
&
caps
);
}
for
(
f
=
0
;
f
<
NB_WIN_FORMATS
;
f
++
)
{
if
(
caps
.
dwFormats
&
win_formats
[
f
][
0
])
{
wave_out_test_deviceOut
(
d
,
f
,
0
,
&
caps
);
wave_out_test_deviceOut
(
d
,
f
,
WAVE_FORMAT_DIRECT
,
&
caps
);
wave_out_test_deviceOut
(
d
,
1
.
0
,
f
,
0
,
&
caps
);
wave_out_test_deviceOut
(
d
,
1
.
0
,
f
,
WAVE_FORMAT_DIRECT
,
&
caps
);
}
}
...
...
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