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
7c112c91
Commit
7c112c91
authored
Mar 27, 2004
by
Robert Reif
Committed by
Alexandre Julliard
Mar 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up white spaces.
Fix spelling error. Improve capture error messages. Fix error reporting when capturing from nonexistent device.
parent
62437ad8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
wave.c
dlls/winmm/tests/wave.c
+17
-11
No files found.
dlls/winmm/tests/wave.c
View file @
7c112c91
...
@@ -420,7 +420,7 @@ static void wave_in_test_deviceIn(int device, int format, DWORD flags, LPWAVEINC
...
@@ -420,7 +420,7 @@ static void wave_in_test_deviceIn(int device, int format, DWORD flags, LPWAVEINC
frag
.
lpNext
=
0
;
frag
.
lpNext
=
0
;
rc
=
waveInPrepareHeader
(
win
,
&
frag
,
sizeof
(
frag
));
rc
=
waveInPrepareHeader
(
win
,
&
frag
,
sizeof
(
frag
));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInPrepareHeader: device=%d rc=%d
\n
"
,
device
,
rc
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInPrepareHeader: device=%d rc=%d
(%s)
\n
"
,
device
,
rc
,
wave_in_error
(
rc
)
);
ok
(
frag
.
dwFlags
&
WHDR_PREPARED
,
"waveInPrepareHeader: prepared flag not set
\n
"
);
ok
(
frag
.
dwFlags
&
WHDR_PREPARED
,
"waveInPrepareHeader: prepared flag not set
\n
"
);
if
(
winetest_interactive
&&
rc
==
MMSYSERR_NOERROR
)
{
if
(
winetest_interactive
&&
rc
==
MMSYSERR_NOERROR
)
{
...
@@ -428,21 +428,27 @@ static void wave_in_test_deviceIn(int device, int format, DWORD flags, LPWAVEINC
...
@@ -428,21 +428,27 @@ static void wave_in_test_deviceIn(int device, int format, DWORD flags, LPWAVEINC
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
,
flags
);
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
,
flags
);
rc
=
waveInAddBuffer
(
win
,
&
frag
,
sizeof
(
frag
));
rc
=
waveInAddBuffer
(
win
,
&
frag
,
sizeof
(
frag
));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInAddBuffer: device=%d rc=%d
\n
"
,
device
,
rc
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInAddBuffer: device=%d rc=%d
(%s)
\n
"
,
device
,
rc
,
wave_in_error
(
rc
)
);
rc
=
waveInStart
(
win
);
rc
=
waveInStart
(
win
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInStart: device=%d rc=%d
\n
"
,
device
,
rc
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInStart: device=%d rc=%d(%s)
\n
"
,
device
,
rc
,
wave_in_error
(
rc
));
res
=
WaitForSingleObject
(
hevent
,
1200
);
res
=
WaitForSingleObject
(
hevent
,
1200
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed for header
\n
"
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed for header
\n
"
);
ok
(
frag
.
dwFlags
&
WHDR_DONE
,
"WHDR_DONE not set in frag.dwFlags
\n
"
);
ok
(
frag
.
dwFlags
&
WHDR_DONE
,
"WHDR_DONE no set in frag.dwFlags
\n
"
);
ok
(
frag
.
dwBytesRecorded
==
wfx
.
nAvgBytesPerSec
,
"frag.dwBytesRecorded=%ld, should=%ld
\n
"
,
ok
(
frag
.
dwBytesRecorded
==
wfx
.
nAvgBytesPerSec
,
"frag.dwBytesRecorded=%ld, should=%ld
\n
"
,
frag
.
dwBytesRecorded
,
wfx
.
nAvgBytesPerSec
);
frag
.
dwBytesRecorded
,
wfx
.
nAvgBytesPerSec
);
/* stop playing on error */
if
(
res
!=
WAIT_OBJECT_0
)
{
rc
=
waveInStop
(
win
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInStop: device=%d rc=%d(%s)
\n
"
,
device
,
rc
,
wave_in_error
(
rc
));
}
}
}
rc
=
waveInUnprepareHeader
(
win
,
&
frag
,
sizeof
(
frag
));
rc
=
waveInUnprepareHeader
(
win
,
&
frag
,
sizeof
(
frag
));
ok
(
rc
==
MMSYSERR_NOERROR
,
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInUnprepareHeader: device=%d rc=%d
\n
"
,
device
,
rc
);
"waveInUnprepareHeader: device=%d rc=%d
(%s)
\n
"
,
device
,
rc
,
wave_in_error
(
rc
)
);
waveInClose
(
win
);
waveInClose
(
win
);
res
=
WaitForSingleObject
(
hevent
,
1000
);
res
=
WaitForSingleObject
(
hevent
,
1000
);
...
@@ -467,7 +473,7 @@ static void wave_in_tests()
...
@@ -467,7 +473,7 @@ static void wave_in_tests()
rc
=
waveInGetDevCapsA
(
ndev
+
1
,
&
caps
,
sizeof
(
caps
));
rc
=
waveInGetDevCapsA
(
ndev
+
1
,
&
caps
,
sizeof
(
caps
));
ok
(
rc
==
MMSYSERR_BADDEVICEID
,
ok
(
rc
==
MMSYSERR_BADDEVICEID
,
"waveInGetDevCapsA: MMSYSERR_BADDEVICEID expected, got %d
\n
"
,
rc
);
"waveInGetDevCapsA: MMSYSERR_BADDEVICEID expected, got %d
(%s)
\n
"
,
rc
,
wave_in_error
(
rc
)
);
format
.
wFormatTag
=
WAVE_FORMAT_PCM
;
format
.
wFormatTag
=
WAVE_FORMAT_PCM
;
format
.
nChannels
=
2
;
format
.
nChannels
=
2
;
...
@@ -478,21 +484,21 @@ static void wave_in_tests()
...
@@ -478,21 +484,21 @@ static void wave_in_tests()
format
.
cbSize
=
0
;
format
.
cbSize
=
0
;
rc
=
waveInOpen
(
&
win
,
ndev
+
1
,
&
format
,
0
,
0
,
CALLBACK_NULL
);
rc
=
waveInOpen
(
&
win
,
ndev
+
1
,
&
format
,
0
,
0
,
CALLBACK_NULL
);
ok
(
rc
==
MMSYSERR_BADDEVICEID
,
ok
(
rc
==
MMSYSERR_BADDEVICEID
,
"waveInOpen: MMSYSERR_BADDEVICEID expected, got %d
\n
"
,
rc
);
"waveInOpen: MMSYSERR_BADDEVICEID expected, got %d
(%s)
\n
"
,
rc
,
wave_in_error
(
rc
)
);
for
(
d
=
0
;
d
<
ndev
;
d
++
)
{
for
(
d
=
0
;
d
<
ndev
;
d
++
)
{
rc
=
waveInGetDevCapsA
(
d
,
&
caps
,
sizeof
(
caps
));
rc
=
waveInGetDevCapsA
(
d
,
&
caps
,
sizeof
(
caps
));
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
MMSYSERR_BADDEVICEID
,
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
MMSYSERR_BADDEVICEID
,
"waveInGetDevCapsA: failed to get capabilities of device %d: rc=%d
\n
"
,
d
,
rc
);
"waveInGetDevCapsA: failed to get capabilities of device %d: rc=%d
(%s)
\n
"
,
d
,
rc
,
wave_in_error
(
rc
)
);
if
(
rc
==
MMSYSERR_BADDEVICEID
)
if
(
rc
==
MMSYSERR_BADDEVICEID
)
continue
;
continue
;
rc
=
waveInMessage
((
HWAVEIN
)
d
,
DRV_QUERYDEVICEINTERFACESIZE
,
(
DWORD_PTR
)
&
size
,
0
);
rc
=
waveInMessage
((
HWAVEIN
)
d
,
DRV_QUERYDEVICEINTERFACESIZE
,
(
DWORD_PTR
)
&
size
,
0
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInMessage: failed to get interface size for device: %d rc=%d
\n
"
,
d
,
rc
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInMessage: failed to get interface size for device: %d rc=%d(%s)
\n
"
,
d
,
rc
,
wave_in_error
(
rc
)
);
if
(
rc
==
MMSYSERR_NOERROR
)
{
if
(
rc
==
MMSYSERR_NOERROR
)
{
wname
=
(
WCHAR
*
)
malloc
(
size
);
wname
=
(
WCHAR
*
)
malloc
(
size
);
rc
=
waveInMessage
((
HWAVEIN
)
d
,
DRV_QUERYDEVICEINTERFACE
,
(
DWORD_PTR
)
wname
,
size
);
rc
=
waveInMessage
((
HWAVEIN
)
d
,
DRV_QUERYDEVICEINTERFACE
,
(
DWORD_PTR
)
wname
,
size
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInMessage: failed to get interface name for device:: %d rc=%d
\n
"
,
d
,
rc
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInMessage: failed to get interface name for device:: %d rc=%d(%s)
\n
"
,
d
,
rc
,
wave_in_error
(
rc
)
);
if
(
rc
==
MMSYSERR_NOERROR
)
{
if
(
rc
==
MMSYSERR_NOERROR
)
{
name
=
malloc
(
size
/
sizeof
(
WCHAR
));
name
=
malloc
(
size
/
sizeof
(
WCHAR
));
WideCharToMultiByte
(
CP_ACP
,
0
,
wname
,
size
/
sizeof
(
WCHAR
),
name
,
size
/
sizeof
(
WCHAR
),
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
wname
,
size
/
sizeof
(
WCHAR
),
name
,
size
/
sizeof
(
WCHAR
),
NULL
,
NULL
);
...
...
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