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
8f6650cb
Commit
8f6650cb
authored
Jan 31, 2015
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Feb 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/tests: Add MPEGVideo driver tests using a wave audio file.
parent
0d3e7397
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
mci.c
dlls/winmm/tests/mci.c
+39
-0
No files found.
dlls/winmm/tests/mci.c
View file @
8f6650cb
...
...
@@ -1295,6 +1295,44 @@ static void test_AutoOpenWAVE(HWND hwnd)
ok
(
0xDEADF00D
==
intbuf
[
0
]
&&
0xABADCAFE
==
intbuf
[
2
],
"DWORD buffer corruption
\n
"
);
}
static
void
test_playWaveTypeMpegvideo
(
void
)
{
MCIERROR
err
;
MCIDEVICEID
wDeviceID
;
MCI_PLAY_PARMS
play_parm
;
MCI_STATUS_PARMS
status_parm
;
char
buf
[
1024
];
memset
(
buf
,
0
,
sizeof
(
buf
));
err
=
mciSendStringA
(
"open tempfile.wav type MPEGVideo alias mysound"
,
NULL
,
0
,
NULL
);
ok
(
err
==
ok_saved
,
"mci open tempfile.wav type MPEGVideo returned %s
\n
"
,
dbg_mcierr
(
err
));
if
(
err
)
{
skip
(
"Cannot open tempfile.wav type MPEGVideo for playing (%s), skipping
\n
"
,
dbg_mcierr
(
err
));
return
;
}
wDeviceID
=
mciGetDeviceIDA
(
"mysound"
);
ok
(
wDeviceID
==
1
,
"mciGetDeviceIDA mysound returned %u, expected 1
\n
"
,
wDeviceID
);
err
=
mciSendCommandA
(
wDeviceID
,
MCI_PLAY
,
0
,
(
DWORD_PTR
)
&
play_parm
);
ok
(
!
err
,
"mciCommand play returned %s
\n
"
,
dbg_mcierr
(
err
));
err
=
mciSendStringA
(
"status mysound mode"
,
buf
,
sizeof
(
buf
),
NULL
);
ok
(
!
err
,
"mci status mode returned %s
\n
"
,
dbg_mcierr
(
err
));
todo_wine
ok
(
!
strcmp
(
buf
,
"playing"
),
"mci status mode: %s
\n
"
,
buf
);
status_parm
.
dwItem
=
MCI_STATUS_MODE
;
err
=
mciSendCommandA
(
wDeviceID
,
MCI_STATUS
,
MCI_STATUS_ITEM
,
(
DWORD_PTR
)
&
status_parm
);
ok
(
!
err
,
"mciCommand status mode returned %s
\n
"
,
dbg_mcierr
(
err
));
ok
(
status_parm
.
dwReturn
==
MCI_MODE_PLAY
,
"mciCommand status mode: %u
\n
"
,
(
DWORD
)
status_parm
.
dwReturn
);
err
=
mciSendStringA
(
"close mysound"
,
NULL
,
0
,
NULL
);
ok
(
!
err
,
"mci close returned %s
\n
"
,
dbg_mcierr
(
err
));
}
START_TEST
(
mci
)
{
char
curdir
[
MAX_PATH
],
tmpdir
[
MAX_PATH
];
...
...
@@ -1314,6 +1352,7 @@ START_TEST(mci)
test_playWAVE
(
hwnd
);
test_asyncWAVE
(
hwnd
);
test_AutoOpenWAVE
(
hwnd
);
test_playWaveTypeMpegvideo
();
}
else
skip
(
"No output devices available, skipping all output tests
\n
"
);
/* Win9X hangs when exiting with something still open. */
...
...
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