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
8f0f9371
Commit
8f0f9371
authored
Nov 12, 2006
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/tests: Win64 printf format warning fixes.
parent
60c19952
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
63 deletions
+62
-63
Makefile.in
dlls/winmm/tests/Makefile.in
+0
-1
capture.c
dlls/winmm/tests/capture.c
+16
-16
mixer.c
dlls/winmm/tests/mixer.c
+0
-0
mmio.c
dlls/winmm/tests/mmio.c
+26
-26
timer.c
dlls/winmm/tests/timer.c
+4
-4
wave.c
dlls/winmm/tests/wave.c
+16
-16
No files found.
dlls/winmm/tests/Makefile.in
View file @
8f0f9371
...
...
@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
TESTDLL
=
winmm.dll
IMPORTS
=
winmm user32 kernel32
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
CTESTS
=
\
capture.c
\
...
...
dlls/winmm/tests/capture.c
View file @
8f0f9371
...
...
@@ -70,8 +70,8 @@ static void check_position(int device, HWAVEIN win, DWORD bytes,
trace
(
"waveInGetPosition(%s): TIME_BYTES not supported, returned %s
\n
"
,
dev_name
(
device
),
wave_time_format
(
mmtime
.
wType
));
returned
=
time_to_bytes
(
&
mmtime
,
pwfx
);
ok
(
returned
==
bytes
,
"waveInGetPosition(%s): returned %
l
d bytes, "
"should be %
l
d
\n
"
,
dev_name
(
device
),
returned
,
bytes
);
ok
(
returned
==
bytes
,
"waveInGetPosition(%s): returned %d bytes, "
"should be %d
\n
"
,
dev_name
(
device
),
returned
,
bytes
);
mmtime
.
wType
=
TIME_SAMPLES
;
rc
=
waveInGetPosition
(
win
,
&
mmtime
,
sizeof
(
mmtime
));
...
...
@@ -81,8 +81,8 @@ static void check_position(int device, HWAVEIN win, DWORD bytes,
trace
(
"waveInGetPosition(%s): TIME_SAMPLES not supported, "
"returned %s
\n
"
,
dev_name
(
device
),
wave_time_format
(
mmtime
.
wType
));
returned
=
time_to_bytes
(
&
mmtime
,
pwfx
);
ok
(
returned
==
bytes
,
"waveInGetPosition(%s): returned %
l
d samples, "
"should be %
l
d
\n
"
,
dev_name
(
device
),
bytes_to_samples
(
returned
,
pwfx
),
ok
(
returned
==
bytes
,
"waveInGetPosition(%s): returned %d samples, "
"should be %d
\n
"
,
dev_name
(
device
),
bytes_to_samples
(
returned
,
pwfx
),
bytes_to_samples
(
bytes
,
pwfx
));
mmtime
.
wType
=
TIME_MS
;
...
...
@@ -93,8 +93,8 @@ static void check_position(int device, HWAVEIN win, DWORD bytes,
trace
(
"waveInGetPosition(%s): TIME_MS not supported, returned %s
\n
"
,
dev_name
(
device
),
wave_time_format
(
mmtime
.
wType
));
returned
=
time_to_bytes
(
&
mmtime
,
pwfx
);
ok
(
returned
==
bytes
,
"waveInGetPosition(%s): returned %
l
d ms, "
"should be %
l
d
\n
"
,
dev_name
(
device
),
bytes_to_ms
(
returned
,
pwfx
),
ok
(
returned
==
bytes
,
"waveInGetPosition(%s): returned %d ms, "
"should be %d
\n
"
,
dev_name
(
device
),
bytes_to_ms
(
returned
,
pwfx
),
bytes_to_ms
(
bytes
,
pwfx
));
mmtime
.
wType
=
TIME_SMPTE
;
...
...
@@ -143,7 +143,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
DWORD
nSamplesPerSec
=
pwfx
->
nSamplesPerSec
;
hevent
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
ok
(
hevent
!=
NULL
,
"CreateEvent(): error=%
l
d
\n
"
,
GetLastError
());
ok
(
hevent
!=
NULL
,
"CreateEvent(): error=%d
\n
"
,
GetLastError
());
if
(
hevent
==
NULL
)
return
;
...
...
@@ -159,7 +159,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
(
!
(
flags
&
WAVE_FORMAT_DIRECT
)
||
(
flags
&
WAVE_MAPPED
))
&&
!
(
pcaps
->
dwFormats
&
format
))
||
(
rc
==
MMSYSERR_INVALFLAG
&&
(
flags
&
WAVE_FORMAT_DIRECT
)),
"waveInOpen(%s): format=%
l
dx%2dx%d flags=%lx(%s) rc=%s
\n
"
,
"waveInOpen(%s): format=%dx%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
|
flags
),
wave_in_error
(
rc
));
...
...
@@ -169,7 +169,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
"capabilities but opening it failed.
\n
"
);
if
((
rc
==
WAVERR_BADFORMAT
||
rc
==
MMSYSERR_NOTSUPPORTED
)
&&
!
(
pcaps
->
dwFormats
&
format
))
trace
(
"waveInOpen(%s): format=%
l
dx%2dx%d %s rc=%s failed but format "
trace
(
"waveInOpen(%s): format=%dx%2dx%d %s rc=%s failed but format "
"not supported so OK.
\n
"
,
dev_name
(
device
),
pwfx
->
nSamplesPerSec
,
pwfx
->
wBitsPerSample
,
pwfx
->
nChannels
,
flags
&
WAVE_FORMAT_DIRECT
?
"flags=WAVE_FORMAT_DIRECT"
:
...
...
@@ -184,7 +184,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
ok
(
pwfx
->
nChannels
==
nChannels
&&
pwfx
->
wBitsPerSample
==
wBitsPerSample
&&
pwfx
->
nSamplesPerSec
==
nSamplesPerSec
,
"got the wrong format: %
ldx%2dx%d instead of %l
dx%2dx%d
\n
"
,
"got the wrong format: %
dx%2dx%d instead of %
dx%2dx%d
\n
"
,
pwfx
->
nSamplesPerSec
,
pwfx
->
wBitsPerSample
,
pwfx
->
nChannels
,
nSamplesPerSec
,
wBitsPerSample
,
nChannels
);
...
...
@@ -206,7 +206,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
"not set
\n
"
,
dev_name
(
device
));
if
(
winetest_interactive
&&
rc
==
MMSYSERR_NOERROR
)
{
trace
(
"Recording for 1 second at %5
l
dx%2dx%d %s %s
\n
"
,
trace
(
"Recording for 1 second at %5dx%2dx%d %s %s
\n
"
,
pwfx
->
nSamplesPerSec
,
pwfx
->
wBitsPerSample
,
pwfx
->
nChannels
,
get_format_str
(
pwfx
->
wFormatTag
),
flags
&
WAVE_FORMAT_DIRECT
?
"WAVE_FORMAT_DIRECT"
:
...
...
@@ -226,7 +226,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
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
.
dwBytesRecorded
==
pwfx
->
nAvgBytesPerSec
,
"frag.dwBytesRecorded=%
ld, should=%l
d
\n
"
,
"frag.dwBytesRecorded=%
d, should=%
d
\n
"
,
frag
.
dwBytesRecorded
,
pwfx
->
nAvgBytesPerSec
);
/* stop playing on error */
...
...
@@ -261,7 +261,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
rc
==
MMSYSERR_ALLOCATED
||
((
rc
==
WAVERR_BADFORMAT
||
rc
==
MMSYSERR_NOTSUPPORTED
)
&&
!
(
pcaps
->
dwFormats
&
format
)),
"waveOutOpen(%s) format=%
l
dx%2dx%d flags=%lx(%s) rc=%s
\n
"
,
"waveOutOpen(%s) format=%dx%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
));
...
...
@@ -375,7 +375,7 @@ static void wave_in_test_device(int device)
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInMessage(%s): failed to get interface "
"name: rc=%s
\n
"
,
dev_name
(
device
),
wave_in_error
(
rc
));
ok
(
lstrlenW
(
nameW
)
+
1
==
size
/
sizeof
(
WCHAR
),
"got an incorrect size %
l
d
\n
"
,
size
);
"got an incorrect size %d
\n
"
,
size
);
if
(
rc
==
MMSYSERR_NOERROR
)
{
nameA
=
malloc
(
size
/
sizeof
(
WCHAR
));
WideCharToMultiByte
(
CP_ACP
,
0
,
nameW
,
size
/
sizeof
(
WCHAR
),
...
...
@@ -389,7 +389,7 @@ static void wave_in_test_device(int device)
trace
(
" %s:
\"
%s
\"
(%s) %d.%d (%d:%d)
\n
"
,
dev_name
(
device
),
capsA
.
szPname
,
(
nameA
?
nameA
:
"failed"
),
capsA
.
vDriverVersion
>>
8
,
capsA
.
vDriverVersion
&
0xff
,
capsA
.
wMid
,
capsA
.
wPid
);
trace
(
" channels=%d formats=%05
l
x
\n
"
,
trace
(
" channels=%d formats=%05x
\n
"
,
capsA
.
wChannels
,
capsA
.
dwFormats
);
free
(
nameA
);
...
...
@@ -455,7 +455,7 @@ static void wave_in_test_device(int device)
"waveInOpen(%s): opening the device with 2 MHz sample rate should fail: "
" rc=%s
\n
"
,
dev_name
(
device
),
wave_in_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
trace
(
" got %
ldx%2dx%d for %l
dx%2dx%d
\n
"
,
trace
(
" got %
dx%2dx%d for %
dx%2dx%d
\n
"
,
format
.
nSamplesPerSec
,
format
.
wBitsPerSample
,
format
.
nChannels
,
oformat
.
nSamplesPerSec
,
oformat
.
wBitsPerSample
,
...
...
dlls/winmm/tests/mixer.c
View file @
8f0f9371
This diff is collapsed.
Click to expand it.
dlls/winmm/tests/mmio.c
View file @
8f0f9371
...
...
@@ -59,25 +59,25 @@ static void test_mmioDescend(void)
/* first normal RIFF AVI parsing */
ret
=
mmioDescend
(
hmmio
,
&
ckRiff
,
NULL
,
0
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ckRiff
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04
l
x
\n
"
,
ckRiff
.
ckid
);
ok
(
ckRiff
.
fccType
==
formtypeAVI
,
"wrong fccType: %04
l
x
\n
"
,
ckRiff
.
fccType
);
trace
(
"ckid %4.4s cksize %04
lx fccType %4.4s off %04lx flags %04l
x
\n
"
,
ok
(
ckRiff
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04x
\n
"
,
ckRiff
.
ckid
);
ok
(
ckRiff
.
fccType
==
formtypeAVI
,
"wrong fccType: %04x
\n
"
,
ckRiff
.
fccType
);
trace
(
"ckid %4.4s cksize %04
x fccType %4.4s off %04x flags %04
x
\n
"
,
(
LPCSTR
)
&
ckRiff
.
ckid
,
ckRiff
.
cksize
,
(
LPCSTR
)
&
ckRiff
.
fccType
,
ckRiff
.
dwDataOffset
,
ckRiff
.
dwFlags
);
ret
=
mmioDescend
(
hmmio
,
&
ckList
,
&
ckRiff
,
0
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ckList
.
ckid
==
FOURCC_LIST
,
"wrong ckid: %04
l
x
\n
"
,
ckList
.
ckid
);
ok
(
ckList
.
fccType
==
listtypeAVIHEADER
,
"wrong fccType: %04
l
x
\n
"
,
ckList
.
fccType
);
trace
(
"ckid %4.4s cksize %04
lx fccType %4.4s off %04lx flags %04l
x
\n
"
,
ok
(
ckList
.
ckid
==
FOURCC_LIST
,
"wrong ckid: %04x
\n
"
,
ckList
.
ckid
);
ok
(
ckList
.
fccType
==
listtypeAVIHEADER
,
"wrong fccType: %04x
\n
"
,
ckList
.
fccType
);
trace
(
"ckid %4.4s cksize %04
x fccType %4.4s off %04x flags %04
x
\n
"
,
(
LPCSTR
)
&
ckList
.
ckid
,
ckList
.
cksize
,
(
LPCSTR
)
&
ckList
.
fccType
,
ckList
.
dwDataOffset
,
ckList
.
dwFlags
);
ret
=
mmioDescend
(
hmmio
,
&
ck
,
&
ckList
,
0
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ck
.
ckid
==
ckidAVIMAINHDR
,
"wrong ckid: %04
l
x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
0
,
"wrong fccType: %04
l
x
\n
"
,
ck
.
fccType
);
trace
(
"ckid %4.4s cksize %04
lx fccType %4.4s off %04lx flags %04l
x
\n
"
,
ok
(
ck
.
ckid
==
ckidAVIMAINHDR
,
"wrong ckid: %04x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
0
,
"wrong fccType: %04x
\n
"
,
ck
.
fccType
);
trace
(
"ckid %4.4s cksize %04
x fccType %4.4s off %04x flags %04
x
\n
"
,
(
LPCSTR
)
&
ck
.
ckid
,
ck
.
cksize
,
(
LPCSTR
)
&
ck
.
fccType
,
ck
.
dwDataOffset
,
ck
.
dwFlags
);
...
...
@@ -101,23 +101,23 @@ static void test_mmioDescend(void)
ck
.
fccType
=
0
;
ret
=
mmioDescend
(
hmmio
,
&
ck
,
NULL
,
MMIO_FINDRIFF
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ck
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04
l
x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
formtypeAVI
,
"wrong fccType: %04
l
x
\n
"
,
ck
.
fccType
);
ok
(
ck
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
formtypeAVI
,
"wrong fccType: %04x
\n
"
,
ck
.
fccType
);
mmioSeek
(
hmmio
,
0
,
SEEK_SET
);
memset
(
&
ck
,
0x55
,
sizeof
(
ck
));
ret
=
mmioDescend
(
hmmio
,
&
ck
,
NULL
,
0
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ck
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04
l
x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
formtypeAVI
,
"wrong fccType: %04
l
x
\n
"
,
ck
.
fccType
);
ok
(
ck
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
formtypeAVI
,
"wrong fccType: %04x
\n
"
,
ck
.
fccType
);
/* do NOT seek, use current file position */
memset
(
&
ck
,
0x55
,
sizeof
(
ck
));
ck
.
fccType
=
0
;
ret
=
mmioDescend
(
hmmio
,
&
ck
,
NULL
,
MMIO_FINDLIST
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ck
.
ckid
==
FOURCC_LIST
,
"wrong ckid: %04
l
x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
listtypeAVIHEADER
,
"wrong fccType: %04
l
x
\n
"
,
ck
.
fccType
);
ok
(
ck
.
ckid
==
FOURCC_LIST
,
"wrong ckid: %04x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
listtypeAVIHEADER
,
"wrong fccType: %04x
\n
"
,
ck
.
fccType
);
mmioSeek
(
hmmio
,
0
,
SEEK_SET
);
memset
(
&
ck
,
0x55
,
sizeof
(
ck
));
...
...
@@ -125,41 +125,41 @@ static void test_mmioDescend(void)
ck
.
fccType
=
listtypeAVIHEADER
;
ret
=
mmioDescend
(
hmmio
,
&
ck
,
NULL
,
MMIO_FINDCHUNK
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ck
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04
l
x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
formtypeAVI
,
"wrong fccType: %04
l
x
\n
"
,
ck
.
fccType
);
ok
(
ck
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
formtypeAVI
,
"wrong fccType: %04x
\n
"
,
ck
.
fccType
);
/* do NOT seek, use current file position */
memset
(
&
ck
,
0x55
,
sizeof
(
ck
));
ck
.
ckid
=
FOURCC_LIST
;
ret
=
mmioDescend
(
hmmio
,
&
ck
,
NULL
,
MMIO_FINDCHUNK
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ck
.
ckid
==
FOURCC_LIST
,
"wrong ckid: %04
l
x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
listtypeAVIHEADER
,
"wrong fccType: %04
l
x
\n
"
,
ck
.
fccType
);
ok
(
ck
.
ckid
==
FOURCC_LIST
,
"wrong ckid: %04x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
listtypeAVIHEADER
,
"wrong fccType: %04x
\n
"
,
ck
.
fccType
);
mmioSeek
(
hmmio
,
0
,
SEEK_SET
);
memset
(
&
ck
,
0x55
,
sizeof
(
ck
));
ck
.
ckid
=
FOURCC_RIFF
;
ret
=
mmioDescend
(
hmmio
,
&
ck
,
NULL
,
MMIO_FINDCHUNK
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ck
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04
l
x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
formtypeAVI
,
"wrong fccType: %04
l
x
\n
"
,
ck
.
fccType
);
ok
(
ck
.
ckid
==
FOURCC_RIFF
,
"wrong ckid: %04x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
==
formtypeAVI
,
"wrong fccType: %04x
\n
"
,
ck
.
fccType
);
/* do NOT seek, use current file position */
memset
(
&
ckList
,
0x55
,
sizeof
(
ckList
));
ckList
.
ckid
=
0
;
ret
=
mmioDescend
(
hmmio
,
&
ckList
,
&
ck
,
MMIO_FINDCHUNK
);
ok
(
ret
==
MMSYSERR_NOERROR
,
"mmioDescend error %u
\n
"
,
ret
);
ok
(
ckList
.
ckid
==
FOURCC_LIST
,
"wrong ckid: %04
l
x
\n
"
,
ckList
.
ckid
);
ok
(
ckList
.
fccType
==
listtypeAVIHEADER
,
"wrong fccType: %04
l
x
\n
"
,
ckList
.
fccType
);
ok
(
ckList
.
ckid
==
FOURCC_LIST
,
"wrong ckid: %04x
\n
"
,
ckList
.
ckid
);
ok
(
ckList
.
fccType
==
listtypeAVIHEADER
,
"wrong fccType: %04x
\n
"
,
ckList
.
fccType
);
mmioSeek
(
hmmio
,
0
,
SEEK_SET
);
memset
(
&
ck
,
0x55
,
sizeof
(
ck
));
ret
=
mmioDescend
(
hmmio
,
&
ck
,
NULL
,
MMIO_FINDCHUNK
);
ok
(
ret
==
MMIOERR_CHUNKNOTFOUND
||
ret
==
MMIOERR_INVALIDFILE
,
"mmioDescend returned %u
\n
"
,
ret
);
ok
(
ck
.
ckid
!=
0x55555555
,
"wrong ckid: %04
l
x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
!=
0x55555555
,
"wrong fccType: %04
l
x
\n
"
,
ck
.
fccType
);
ok
(
ck
.
dwDataOffset
!=
0x55555555
,
"wrong dwDataOffset: %04
l
x
\n
"
,
ck
.
dwDataOffset
);
ok
(
ck
.
ckid
!=
0x55555555
,
"wrong ckid: %04x
\n
"
,
ck
.
ckid
);
ok
(
ck
.
fccType
!=
0x55555555
,
"wrong fccType: %04x
\n
"
,
ck
.
fccType
);
ok
(
ck
.
dwDataOffset
!=
0x55555555
,
"wrong dwDataOffset: %04x
\n
"
,
ck
.
dwDataOffset
);
mmioSeek
(
hmmio
,
0
,
SEEK_SET
);
memset
(
&
ck
,
0x55
,
sizeof
(
ck
));
...
...
dlls/winmm/tests/timer.c
View file @
8f0f9371
...
...
@@ -119,14 +119,14 @@ static void test_timer(UINT period, UINT resolution)
if
(
i
==
0
)
{
if
(
winetest_debug
>
1
)
trace
(
"time[%d] = %
l
u
\n
"
,
i
,
times
[
i
]);
trace
(
"time[%d] = %u
\n
"
,
i
,
times
[
i
]);
}
else
{
delta
=
times
[
i
]
-
times
[
i
-
1
];
if
(
winetest_debug
>
1
)
trace
(
"time[%d] = %
l
u delta = %d
\n
"
,
i
,
times
[
i
],
delta
);
trace
(
"time[%d] = %u delta = %d
\n
"
,
i
,
times
[
i
],
delta
);
sum
+=
delta
;
deviation
+=
((
delta
-
period
)
*
(
delta
-
period
));
...
...
@@ -139,7 +139,7 @@ static void test_timer(UINT period, UINT resolution)
}
}
trace
(
"min = %
lu, max = %l
u, average = %f, standard deviation = %f
\n
"
,
trace
(
"min = %
u, max = %
u, average = %f, standard deviation = %f
\n
"
,
dwMin
,
dwMax
,
sum
/
(
count
-
1
),
sqrt
(
deviation
/
(
count
-
2
)));
}
...
...
@@ -167,7 +167,7 @@ static void CALLBACK priorityTimeProc(UINT uID, UINT uMsg, DWORD_PTR dwUser,
DWORD_PTR
dw1
,
DWORD_PTR
dw2
)
{
priority
=
GetThreadPriority
(
GetCurrentThread
());
ok
(
priority
!=
THREAD_PRIORITY_ERROR_RETURN
,
"GetThreadPriority() failed, GetLastError() = %08
l
x
\n
"
,
GetLastError
());
ok
(
priority
!=
THREAD_PRIORITY_ERROR_RETURN
,
"GetThreadPriority() failed, GetLastError() = %08x
\n
"
,
GetLastError
());
fired
=
TRUE
;
}
...
...
dlls/winmm/tests/wave.c
View file @
8f0f9371
...
...
@@ -319,7 +319,7 @@ const char * wave_header_flags(DWORD flags)
}
if
(
flags
&
~
WHDR_MASK
)
{
char
temp
[
32
];
sprintf
(
temp
,
"UNKNOWN(0x%08
l
x)"
,
flags
&
~
WHDR_MASK
);
sprintf
(
temp
,
"UNKNOWN(0x%08x)"
,
flags
&
~
WHDR_MASK
);
if
(
!
first
)
strcat
(
msg
,
" "
);
strcat
(
msg
,
temp
);
}
...
...
@@ -461,8 +461,8 @@ static void check_position(int device, HWAVEOUT wout, DWORD bytes,
trace
(
"waveOutGetPosition(%s): TIME_BYTES not supported, returned %s
\n
"
,
dev_name
(
device
),
wave_time_format
(
mmtime
.
wType
));
returned
=
time_to_bytes
(
&
mmtime
,
pwfx
);
ok
(
returned
==
bytes
,
"waveOutGetPosition(%s): returned %
l
d bytes, "
"should be %
l
d
\n
"
,
dev_name
(
device
),
returned
,
bytes
);
ok
(
returned
==
bytes
,
"waveOutGetPosition(%s): returned %d bytes, "
"should be %d
\n
"
,
dev_name
(
device
),
returned
,
bytes
);
mmtime
.
wType
=
TIME_SAMPLES
;
rc
=
waveOutGetPosition
(
wout
,
&
mmtime
,
sizeof
(
mmtime
));
...
...
@@ -472,8 +472,8 @@ static void check_position(int device, HWAVEOUT wout, DWORD bytes,
trace
(
"waveOutGetPosition(%s): TIME_SAMPLES not supported, "
"returned %s
\n
"
,
dev_name
(
device
),
wave_time_format
(
mmtime
.
wType
));
returned
=
time_to_bytes
(
&
mmtime
,
pwfx
);
ok
(
returned
==
bytes
,
"waveOutGetPosition(%s): returned %
l
d samples "
"(%
ld bytes), should be %ld (%l
d bytes)
\n
"
,
dev_name
(
device
),
ok
(
returned
==
bytes
,
"waveOutGetPosition(%s): returned %d samples "
"(%
d bytes), should be %d (%
d bytes)
\n
"
,
dev_name
(
device
),
bytes_to_samples
(
returned
,
pwfx
),
returned
,
bytes_to_samples
(
bytes
,
pwfx
),
bytes
);
...
...
@@ -485,8 +485,8 @@ static void check_position(int device, HWAVEOUT wout, DWORD bytes,
trace
(
"waveOutGetPosition(%s): TIME_MS not supported, returned %s
\n
"
,
dev_name
(
device
),
wave_time_format
(
mmtime
.
wType
));
returned
=
time_to_bytes
(
&
mmtime
,
pwfx
);
ok
(
returned
==
bytes
,
"waveOutGetPosition(%s): returned %
l
d ms, "
"(%
ld bytes), should be %ld (%l
d bytes)
\n
"
,
dev_name
(
device
),
ok
(
returned
==
bytes
,
"waveOutGetPosition(%s): returned %d ms, "
"(%
d bytes), should be %d (%
d bytes)
\n
"
,
dev_name
(
device
),
bytes_to_ms
(
returned
,
pwfx
),
returned
,
bytes_to_ms
(
bytes
,
pwfx
),
bytes
);
...
...
@@ -581,7 +581,7 @@ static void wave_out_test_deviceOut(int device, double duration,
int
i
,
j
;
hevent
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
ok
(
hevent
!=
NULL
,
"CreateEvent(): error=%
l
d
\n
"
,
GetLastError
());
ok
(
hevent
!=
NULL
,
"CreateEvent(): error=%d
\n
"
,
GetLastError
());
if
(
hevent
==
NULL
)
return
;
...
...
@@ -629,7 +629,7 @@ static void wave_out_test_deviceOut(int device, double duration,
(
!
(
flags
&
WAVE_FORMAT_DIRECT
)
||
(
flags
&
WAVE_MAPPED
))
&&
!
(
pcaps
->
dwFormats
&
format
))
||
(
rc
==
MMSYSERR_INVALFLAG
&&
(
flags
&
WAVE_FORMAT_DIRECT
)),
"waveOutOpen(%s): format=%
l
dx%2dx%d flags=%lx(%s) rc=%s
\n
"
,
"waveOutOpen(%s): format=%dx%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
|
flags
),
wave_out_error
(
rc
));
...
...
@@ -639,7 +639,7 @@ static void wave_out_test_deviceOut(int device, double duration,
"capabilities but opening it failed.
\n
"
);
if
((
rc
==
WAVERR_BADFORMAT
||
rc
==
MMSYSERR_NOTSUPPORTED
)
&&
!
(
pcaps
->
dwFormats
&
format
))
trace
(
"waveOutOpen(%s): format=%
l
dx%2dx%d %s rc=%s failed but format "
trace
(
"waveOutOpen(%s): format=%dx%2dx%d %s rc=%s failed but format "
"not supported so OK.
\n
"
,
dev_name
(
device
),
pwfx
->
nSamplesPerSec
,
pwfx
->
wBitsPerSample
,
pwfx
->
nChannels
,
flags
&
WAVE_FORMAT_DIRECT
?
"flags=WAVE_FORMAT_DIRECT"
:
...
...
@@ -652,7 +652,7 @@ static void wave_out_test_deviceOut(int device, double duration,
ok
(
pwfx
->
nChannels
==
nChannels
&&
pwfx
->
wBitsPerSample
==
wBitsPerSample
&&
pwfx
->
nSamplesPerSec
==
nSamplesPerSec
,
"got the wrong format: %
ldx%2dx%d instead of %l
dx%2dx%d
\n
"
,
"got the wrong format: %
dx%2dx%d instead of %
dx%2dx%d
\n
"
,
pwfx
->
nSamplesPerSec
,
pwfx
->
wBitsPerSample
,
pwfx
->
nChannels
,
nSamplesPerSec
,
wBitsPerSample
,
nChannels
);
...
...
@@ -690,7 +690,7 @@ static void wave_out_test_deviceOut(int device, double duration,
if
(
interactive
&&
rc
==
MMSYSERR_NOERROR
)
{
DWORD
start
,
end
;
trace
(
"Playing %g second %s at %5
ldx%2dx%d %2d header%s %d loop%s %l
d bytes %s %s
\n
"
,
duration
,
trace
(
"Playing %g second %s at %5
dx%2dx%d %2d header%s %d loop%s %
d bytes %s %s
\n
"
,
duration
,
sine
?
"440Hz tone"
:
"silence"
,
pwfx
->
nSamplesPerSec
,
pwfx
->
wBitsPerSample
,
pwfx
->
nChannels
,
headers
,
headers
>
1
?
"s"
:
" "
,
loops
,
loops
==
1
?
" "
:
"s"
,
length
*
(
loops
+
1
),
...
...
@@ -873,7 +873,7 @@ static void wave_out_test_device(int device)
(
DWORD_PTR
)
nameW
,
size
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutMessage(%s): failed to get interface "
"name, rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
ok
(
lstrlenW
(
nameW
)
+
1
==
size
/
sizeof
(
WCHAR
),
"got an incorrect size %
l
d
\n
"
,
size
);
ok
(
lstrlenW
(
nameW
)
+
1
==
size
/
sizeof
(
WCHAR
),
"got an incorrect size %d
\n
"
,
size
);
if
(
rc
==
MMSYSERR_NOERROR
)
{
nameA
=
malloc
(
size
/
sizeof
(
WCHAR
));
WideCharToMultiByte
(
CP_ACP
,
0
,
nameW
,
size
/
sizeof
(
WCHAR
),
nameA
,
...
...
@@ -888,7 +888,7 @@ static void wave_out_test_device(int device)
trace
(
" %s:
\"
%s
\"
(%s) %d.%d (%d:%d)
\n
"
,
dev_name
(
device
),
capsA
.
szPname
,
(
nameA
?
nameA
:
"failed"
),
capsA
.
vDriverVersion
>>
8
,
capsA
.
vDriverVersion
&
0xff
,
capsA
.
wMid
,
capsA
.
wPid
);
trace
(
" channels=%d formats=%05
lx support=%04l
x
\n
"
,
trace
(
" channels=%d formats=%05
x support=%04
x
\n
"
,
capsA
.
wChannels
,
capsA
.
dwFormats
,
capsA
.
dwSupport
);
trace
(
" %s
\n
"
,
wave_out_caps
(
capsA
.
dwSupport
));
free
(
nameA
);
...
...
@@ -1084,7 +1084,7 @@ static void wave_out_test_device(int device)
"waveOutOpen(%s): opening the device in 11 bits mode should fail: "
"rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
trace
(
" got %
ldx%2dx%d for %l
dx%2dx%d
\n
"
,
trace
(
" got %
dx%2dx%d for %
dx%2dx%d
\n
"
,
format
.
nSamplesPerSec
,
format
.
wBitsPerSample
,
format
.
nChannels
,
oformat
.
nSamplesPerSec
,
oformat
.
wBitsPerSample
,
...
...
@@ -1107,7 +1107,7 @@ static void wave_out_test_device(int device)
"waveOutOpen(%s): opening the device at 2 MHz sample rate should fail: "
"rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
trace
(
" got %
ldx%2dx%d for %l
dx%2dx%d
\n
"
,
trace
(
" got %
dx%2dx%d for %
dx%2dx%d
\n
"
,
format
.
nSamplesPerSec
,
format
.
wBitsPerSample
,
format
.
nChannels
,
oformat
.
nSamplesPerSec
,
oformat
.
wBitsPerSample
,
...
...
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