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
6d7bd62a
Commit
6d7bd62a
authored
Nov 03, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/tests: Compile with -D__WINESRC__.
parent
36638ef5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
91 deletions
+91
-91
Makefile.in
dlls/winmm/tests/Makefile.in
+0
-1
capture.c
dlls/winmm/tests/capture.c
+4
-3
mci.c
dlls/winmm/tests/mci.c
+31
-30
mcicda.c
dlls/winmm/tests/mcicda.c
+2
-2
mmio.c
dlls/winmm/tests/mmio.c
+46
-44
wave.c
dlls/winmm/tests/wave.c
+8
-11
No files found.
dlls/winmm/tests/Makefile.in
View file @
6d7bd62a
TESTDLL
=
winmm.dll
IMPORTS
=
winmm user32 advapi32
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
capture.c
\
...
...
dlls/winmm/tests/capture.c
View file @
6d7bd62a
...
...
@@ -43,9 +43,9 @@ static const char * wave_in_error(MMRESULT error)
static
char
long_msg
[
1100
];
MMRESULT
rc
;
rc
=
waveInGetErrorText
(
error
,
msg
,
sizeof
(
msg
));
rc
=
waveInGetErrorText
A
(
error
,
msg
,
sizeof
(
msg
));
if
(
rc
!=
MMSYSERR_NOERROR
)
sprintf
(
long_msg
,
"waveInGetErrorText(%x) failed with error %x"
,
error
,
rc
);
sprintf
(
long_msg
,
"waveInGetErrorText
A
(%x) failed with error %x"
,
error
,
rc
);
else
sprintf
(
long_msg
,
"%s(%s)"
,
mmsys_error
(
error
),
msg
);
return
long_msg
;
...
...
@@ -127,7 +127,8 @@ static void check_position(int device, HWAVEIN win, DWORD bytes,
dev_name
(
device
));
}
static
void
wave_in_test_deviceIn
(
int
device
,
LPWAVEFORMATEX
pwfx
,
DWORD
format
,
DWORD
flags
,
LPWAVEINCAPS
pcaps
)
static
void
wave_in_test_deviceIn
(
int
device
,
WAVEFORMATEX
*
pwfx
,
DWORD
format
,
DWORD
flags
,
WAVEINCAPSA
*
pcaps
)
{
HWAVEIN
win
;
HANDLE
hevent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
...
...
dlls/winmm/tests/mci.c
View file @
6d7bd62a
...
...
@@ -30,12 +30,12 @@
static
MCIERROR
ok_saved
=
MCIERR_FILE_NOT_FOUND
;
typedef
union
{
MCI_INFO_PARMS
info
;
MCI_INFO_PARMS
A
info
;
MCI_STATUS_PARMS
status
;
MCI_WAVE_SET_PARMS
set
;
MCI_WAVE_OPEN_PARMS
open
;
MCI_WAVE_OPEN_PARMS
A
open
;
MCI_GETDEVCAPS_PARMS
caps
;
MCI_SYSINFO_PARMS
sys
;
MCI_SYSINFO_PARMS
A
sys
;
MCI_SEEK_PARMS
seek
;
MCI_GENERIC_PARMS
gen
;
}
MCI_PARMS_UNION
;
...
...
@@ -412,8 +412,8 @@ static void test_openCloseWAVE(HWND hwnd)
ok
(
!
err
,
"mci close shareable returned %s
\n
"
,
dbg_mcierr
(
err
));
}
err
=
mciGetDeviceID
(
"waveaudio"
);
ok
(
err
==
0
,
"mciGetDeviceID
waveaudio returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
A
(
"waveaudio"
);
ok
(
!
err
,
"mciGetDeviceIDA
waveaudio returned %u, expected 0
\n
"
,
err
);
err
=
mciSendStringA
(
command_open
,
buf
,
sizeof
(
buf
),
hwnd
);
ok
(
!
err
,
"mci %s returned %s
\n
"
,
command_open
,
dbg_mcierr
(
err
));
...
...
@@ -527,8 +527,8 @@ static void test_openCloseWAVE(HWND hwnd)
ok
(
err
==
MCIERR_UNRECOGNIZED_KEYWORD
||
broken
(
err
==
MMSYSERR_NOTSUPPORTED
/* Win9x */
),
"mciCommand MCI_INFO other: %s
\n
"
,
dbg_mcierr
(
err
));
ok
(
!
strcmp
(
buf
,
"K"
),
"info output buffer %s
\n
"
,
buf
);
err
=
mciGetDeviceID
(
"all"
);
ok
(
MCI_ALL_DEVICE_ID
==
err
||
/* Win9x */
(
WORD
)
MCI_ALL_DEVICE_ID
==
err
,
"mciGetDeviceID all returned %u, expected %d
\n
"
,
err
,
MCI_ALL_DEVICE_ID
);
err
=
mciGetDeviceID
A
(
"all"
);
ok
(
err
==
MCI_ALL_DEVICE_ID
,
"mciGetDeviceIDA all returned %u, expected MCI_ALL_DEVICE_ID
\n
"
,
err
);
err
=
mciSendStringA
(
command_close_my
,
NULL
,
0
,
hwnd
);
ok
(
!
err
,
"mci %s returned %s
\n
"
,
command_close_my
,
dbg_mcierr
(
err
));
...
...
@@ -596,8 +596,8 @@ static void test_openCloseWAVE(HWND hwnd)
ok
(
0xDEADF00D
==
intbuf
[
0
]
&&
0xABADCAFE
==
intbuf
[
2
],
"DWORD buffer corruption
\n
"
);
err
=
mciGetDeviceID
(
"waveaudio"
);
ok
(
err
==
1
,
"mciGetDeviceID waveaudio returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
A
(
"waveaudio"
);
ok
(
err
==
1
,
"mciGetDeviceIDA waveaudio returned %u, expected 1
\n
"
,
err
);
err
=
mciSendStringA
(
"open no-such-file.wav alias waveaudio"
,
buf
,
sizeof
(
buf
),
NULL
);
ok
(
err
==
MCIERR_DUPLICATE_ALIAS
,
"mci open alias waveaudio returned %s
\n
"
,
dbg_mcierr
(
err
));
...
...
@@ -638,12 +638,12 @@ static void test_recordWAVE(HWND hwnd)
ok
(
!
err
,
"mciCommand open new type waveaudio alias x notify: %s
\n
"
,
dbg_mcierr
(
err
));
wDeviceID
=
parm
.
open
.
wDeviceID
;
err
=
mciGetDeviceID
(
"x"
);
ok
(
err
==
wDeviceID
,
"mciGetDeviceID
x returned %u, expected %u
\n
"
,
err
,
wDeviceID
);
err
=
mciGetDeviceID
A
(
"x"
);
ok
(
err
==
wDeviceID
,
"mciGetDeviceIDA
x returned %u, expected %u
\n
"
,
err
,
wDeviceID
);
/* Only the alias is looked up. */
err
=
mciGetDeviceID
(
"waveaudio"
);
ok
(
err
==
0
,
"mciGetDeviceID
waveaudio returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
A
(
"waveaudio"
);
ok
(
!
err
,
"mciGetDeviceIDA
waveaudio returned %u, expected 0
\n
"
,
err
);
test_notification
(
hwnd
,
"open new"
,
MCI_NOTIFY_SUCCESSFUL
);
test_notification
(
hwnd
,
"open new no #2"
,
0
);
...
...
@@ -771,8 +771,9 @@ static void test_recordWAVE(HWND hwnd)
if
(
!
err
)
ok_saved
=
0
;
/* Save must not rename the original file. */
if
(
!
DeleteFile
(
"tempfile1.wav"
))
todo_wine
ok
(
FALSE
,
"Save must not rename the original file; DeleteFile returned %d
\n
"
,
GetLastError
());
if
(
!
DeleteFileA
(
"tempfile1.wav"
))
todo_wine
ok
(
FALSE
,
"Save must not rename the original file; DeleteFileA returned %d
\n
"
,
GetLastError
());
err
=
mciSendStringA
(
"set x channels 2"
,
NULL
,
0
,
NULL
);
ok
(
err
==
MCIERR_NONAPPLICABLE_FUNCTION
,
"mci set channels after saving returned %s
\n
"
,
dbg_mcierr
(
err
));
...
...
@@ -807,14 +808,14 @@ static void test_playWAVE(HWND hwnd)
return
;
}
err
=
mciGetDeviceID
(
"mysound"
);
ok
(
err
==
1
,
"mciGetDeviceID
mysound returned %u, expected 1
\n
"
,
err
);
err
=
mciGetDeviceID
A
(
"mysound"
);
ok
(
err
==
1
,
"mciGetDeviceIDA
mysound returned %u, expected 1
\n
"
,
err
);
err
=
mciGetDeviceID
(
"tempfile.wav"
);
ok
(
err
==
0
,
"mciGetDeviceID
tempfile.wav returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
A
(
"tempfile.wav"
);
ok
(
!
err
,
"mciGetDeviceIDA
tempfile.wav returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
(
"waveaudio"
);
ok
(
err
==
0
,
"mciGetDeviceID
waveaudio returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
A
(
"waveaudio"
);
ok
(
!
err
,
"mciGetDeviceIDA
waveaudio returned %u, expected 0
\n
"
,
err
);
err
=
mciSendStringA
(
"status mysound length"
,
buf
,
sizeof
(
buf
),
NULL
);
ok
(
!
err
,
"mci status length returned %s
\n
"
,
dbg_mcierr
(
err
));
...
...
@@ -949,15 +950,15 @@ static void test_asyncWAVE(HWND hwnd)
ok
(
wDeviceID
,
"mci open DeviceID: %d
\n
"
,
wDeviceID
);
test_notification
(
hwnd
,
"open alias notify"
,
MCI_NOTIFY_SUCCESSFUL
);
err
=
mciGetDeviceID
(
"mysound"
);
ok
(
err
==
wDeviceID
,
"mciGetDeviceID
alias returned %u, expected %u
\n
"
,
err
,
wDeviceID
);
err
=
mciGetDeviceID
A
(
"mysound"
);
ok
(
err
==
wDeviceID
,
"mciGetDeviceIDA
alias returned %u, expected %u
\n
"
,
err
,
wDeviceID
);
/* Only the alias is looked up. */
err
=
mciGetDeviceID
(
"tempfile.wav"
);
ok
(
err
==
0
,
"mciGetDeviceID
tempfile.wav returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
A
(
"tempfile.wav"
);
ok
(
!
err
,
"mciGetDeviceIDA
tempfile.wav returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
(
"waveaudio"
);
ok
(
err
==
0
,
"mciGetDeviceID
waveaudio returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
A
(
"waveaudio"
);
ok
(
!
err
,
"mciGetDeviceIDA
waveaudio returned %u, expected 0
\n
"
,
err
);
err
=
mciSendStringA
(
"status mysound mode"
,
buf
,
sizeof
(
buf
),
hwnd
);
ok
(
!
err
,
"mci status mode returned %s
\n
"
,
dbg_mcierr
(
err
));
...
...
@@ -1195,8 +1196,8 @@ static void test_AutoOpenWAVE(HWND hwnd)
if
(
!
err
)
ok
(
!
strcmp
(
buf
,
"tempfile.wav"
),
"sysinfo name 1 open: %s
\n
"
,
buf
);
test_notification
(
hwnd
,
"sysinfo name notify
\n
"
,
MCI_NOTIFY_SUCCESSFUL
);
err
=
mciGetDeviceID
(
"tempfile.wav"
);
ok
(
err
==
1
,
"mciGetDeviceID
tempfile.wav returned %u, expected 1
\n
"
,
err
);
err
=
mciGetDeviceID
A
(
"tempfile.wav"
);
ok
(
err
==
1
,
"mciGetDeviceIDA
tempfile.wav returned %u, expected 1
\n
"
,
err
);
/* Save the full pathname to the file. */
err
=
mciSendStringA
(
"info tempfile.wav file"
,
path
,
sizeof
(
path
),
NULL
);
...
...
@@ -1312,6 +1313,6 @@ START_TEST(mci)
/* Win9X hangs when exiting with something still open. */
err
=
mciSendStringA
(
"close all"
,
NULL
,
0
,
hwnd
);
ok
(
!
err
,
"final close all returned %s
\n
"
,
dbg_mcierr
(
err
));
ok
(
DeleteFile
(
"tempfile.wav"
)
||
ok_saved
,
"Delete tempfile.wav (cause auto-open?)
\n
"
);
ok
(
DeleteFile
A
(
"tempfile.wav"
)
||
ok_saved
,
"Delete tempfile.wav (cause auto-open?)
\n
"
);
DestroyWindow
(
hwnd
);
}
dlls/winmm/tests/mcicda.c
View file @
6d7bd62a
...
...
@@ -26,10 +26,10 @@
typedef
union
{
MCI_STATUS_PARMS
status
;
MCI_GETDEVCAPS_PARMS
caps
;
MCI_OPEN_PARMS
open
;
MCI_OPEN_PARMS
A
open
;
MCI_PLAY_PARMS
play
;
MCI_SEEK_PARMS
seek
;
MCI_SAVE_PARMS
save
;
MCI_SAVE_PARMS
A
save
;
MCI_GENERIC_PARMS
gen
;
}
MCI_PARMS_UNION
;
...
...
dlls/winmm/tests/mmio.c
View file @
6d7bd62a
This diff is collapsed.
Click to expand it.
dlls/winmm/tests/wave.c
View file @
6d7bd62a
...
...
@@ -266,10 +266,9 @@ const char* wave_out_error(MMRESULT error)
static
char
long_msg
[
1100
];
MMRESULT
rc
;
rc
=
waveOutGetErrorText
(
error
,
msg
,
sizeof
(
msg
));
rc
=
waveOutGetErrorText
A
(
error
,
msg
,
sizeof
(
msg
));
if
(
rc
!=
MMSYSERR_NOERROR
)
sprintf
(
long_msg
,
"waveOutGetErrorText(%x) failed with error %x"
,
error
,
rc
);
sprintf
(
long_msg
,
"waveOutGetErrorTextA(%x) failed with error %x"
,
error
,
rc
);
else
sprintf
(
long_msg
,
"%s(%s)"
,
mmsys_error
(
error
),
msg
);
return
long_msg
;
...
...
@@ -574,12 +573,12 @@ static DWORD WINAPI callback_thread(LPVOID lpParameter)
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
);
/* make sure the thread has a message queue */
SetEvent
(
lpParameter
);
while
(
GetMessage
(
&
msg
,
0
,
0
,
0
))
{
while
(
GetMessage
A
(
&
msg
,
0
,
0
,
0
))
{
UINT
message
=
msg
.
message
;
/* for some reason XP sends a WM_USER message before WOM_OPEN */
ok
(
message
==
WOM_OPEN
||
message
==
WOM_DONE
||
message
==
WOM_CLOSE
||
message
==
WM_USER
||
message
==
WM_APP
,
"GetMessage returned unexpected message: %u
\n
"
,
message
);
"GetMessage
A
returned unexpected message: %u
\n
"
,
message
);
if
(
message
==
WOM_OPEN
||
message
==
WOM_DONE
||
message
==
WOM_CLOSE
)
SetEvent
(
lpParameter
);
else
if
(
message
==
WM_APP
)
{
...
...
@@ -591,11 +590,9 @@ static DWORD WINAPI callback_thread(LPVOID lpParameter)
return
0
;
}
static
void
wave_out_test_deviceOut
(
int
device
,
double
duration
,
int
headers
,
int
loops
,
LPWAVEFORMATEX
pwfx
,
DWORD
format
,
DWORD
flags
,
LPWAVEOUTCAPS
pcaps
,
BOOL
interactive
,
BOOL
sine
,
BOOL
pause
)
static
void
wave_out_test_deviceOut
(
int
device
,
double
duration
,
int
headers
,
int
loops
,
WAVEFORMATEX
*
pwfx
,
DWORD
format
,
DWORD
flags
,
WAVEOUTCAPSA
*
pcaps
,
BOOL
interactive
,
BOOL
sine
,
BOOL
pause
)
{
HWAVEOUT
wout
;
HANDLE
hevent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
...
...
@@ -862,7 +859,7 @@ static void wave_out_test_deviceOut(int device, double duration,
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
EXIT:
if
((
flags
&
CALLBACK_TYPEMASK
)
==
CALLBACK_THREAD
)
{
PostThreadMessage
(
thread_id
,
WM_APP
,
0
,
0
);
PostThreadMessage
W
(
thread_id
,
WM_APP
,
0
,
0
);
WaitForSingleObject
(
hevent
,
10000
);
}
CloseHandle
(
hevent
);
...
...
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