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
e0760806
Commit
e0760806
authored
Aug 02, 2004
by
Francois Gouget
Committed by
Alexandre Julliard
Aug 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Play back what has been recorded when in interactive mode so that the
user can verify that the recording is correct.
parent
60f0439b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletion
+43
-1
capture.c
dlls/winmm/tests/capture.c
+41
-0
wave.c
dlls/winmm/tests/wave.c
+1
-1
winmm_test.h
dlls/winmm/tests/winmm_test.h
+1
-0
No files found.
dlls/winmm/tests/capture.c
View file @
e0760806
...
...
@@ -143,6 +143,47 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
"waveInClose: device=%s rc=%s
\n
"
,
dev_name
(
device
),
wave_in_error
(
rc
));
res
=
WaitForSingleObject
(
hevent
,
1000
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed for close
\n
"
);
if
(
winetest_interactive
)
{
/*
* Now play back what we recorded
*/
HWAVEOUT
wout
;
trace
(
"Playing back recorded sound
\n
"
);
rc
=
waveOutOpen
(
&
wout
,
WAVE_MAPPER
,
pwfx
,(
DWORD
)
hevent
,
0
,
CALLBACK_EVENT
);
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
MMSYSERR_BADDEVICEID
||
rc
==
MMSYSERR_NOTENABLED
||
rc
==
MMSYSERR_NODRIVER
||
rc
==
MMSYSERR_ALLOCATED
||
((
rc
==
WAVERR_BADFORMAT
||
rc
==
MMSYSERR_NOTSUPPORTED
)
&&
!
(
pcaps
->
dwFormats
&
format
)),
"waveOutOpen: device=%s format=%ldx%2dx%d flags=%lx(%s) rc=%s
\n
"
,
dev_name
(
device
),
pwfx
->
nSamplesPerSec
,
pwfx
->
wBitsPerSample
,
pwfx
->
nChannels
,
CALLBACK_EVENT
|
flags
,
wave_open_flags
(
CALLBACK_EVENT
),
wave_out_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
rc
=
waveOutPrepareHeader
(
wout
,
&
frag
,
sizeof
(
frag
));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutPrepareHeader: device=%s rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
WaitForSingleObject
(
hevent
,
INFINITE
);
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
);
rc
=
waveOutUnprepareHeader
(
wout
,
&
frag
,
sizeof
(
frag
));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutUnprepareHeader: device=%s rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
}
rc
=
waveOutClose
(
wout
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutClose: device=%s rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
}
else
trace
(
"Unable to play back the recorded sound
\n
"
);
}
free
(
frag
.
lpData
);
CloseHandle
(
hevent
);
}
...
...
dlls/winmm/tests/wave.c
View file @
e0760806
...
...
@@ -111,7 +111,7 @@ const char* mmsys_error(MMRESULT error)
#undef ERR_TO_STR
}
static
const
char
*
wave_out_error
(
MMRESULT
error
)
const
char
*
wave_out_error
(
MMRESULT
error
)
{
static
char
msg
[
1024
];
static
char
long_msg
[
1100
];
...
...
dlls/winmm/tests/winmm_test.h
View file @
e0760806
...
...
@@ -63,3 +63,4 @@ static const unsigned int win_formats[][4] = {
extern
const
char
*
dev_name
(
int
);
extern
const
char
*
wave_open_flags
(
DWORD
);
extern
const
char
*
mmsys_error
(
MMRESULT
);
extern
const
char
*
wave_out_error
(
MMRESULT
);
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