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
36638ef5
Commit
36638ef5
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: Use a better type for the mixer object.
parent
a749f27a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
59 deletions
+44
-59
mixer.c
dlls/winmm/tests/mixer.c
+44
-59
No files found.
dlls/winmm/tests/mixer.c
View file @
36638ef5
...
...
@@ -184,7 +184,7 @@ static void test_mixerClose(HMIXER mix)
mmsys_error
(
rc
));
}
static
void
mixer_test_controlA
(
HMIXER
mix
,
LPMIXERCONTROLA
control
)
static
void
mixer_test_controlA
(
HMIXER
OBJ
mix
,
MIXERCONTROLA
*
control
)
{
MMRESULT
rc
;
...
...
@@ -201,14 +201,14 @@ static void mixer_test_controlA(HMIXER mix, LPMIXERCONTROLA control)
/* test NULL paDetails */
details
.
paDetails
=
NULL
;
rc
=
mixerGetControlDetails
((
HMIXEROBJ
)
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
rc
=
mixerGetControlDetailsA
(
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"mixerGetDevCapsA: MMSYSERR_INVALPARAM expected, got %s
\n
"
,
mmsys_error
(
rc
));
/* read the current control value */
details
.
paDetails
=
&
value
;
rc
=
mixerGetControlDetails
((
HMIXEROBJ
)
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
rc
=
mixerGetControlDetailsA
(
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetControlDetails(MIXER_GETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -231,7 +231,7 @@ static void mixer_test_controlA(HMIXER mix, LPMIXERCONTROLA control)
new_details
.
cbDetails
=
sizeof
(
new_value
);
/* change the control value by one step */
rc
=
mixerSetControlDetails
((
HMIXEROBJ
)
mix
,
&
new_details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
rc
=
mixerSetControlDetails
(
mix
,
&
new_details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerSetControlDetails(MIXER_SETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -247,7 +247,7 @@ static void mixer_test_controlA(HMIXER mix, LPMIXERCONTROLA control)
ret_details
.
cbDetails
=
sizeof
(
ret_value
);
/* read back the new control value */
rc
=
mixerGetControlDetails
((
HMIXEROBJ
)
mix
,
&
ret_details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
rc
=
mixerGetControlDetailsA
(
mix
,
&
ret_details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetControlDetails(MIXER_GETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -266,7 +266,7 @@ static void mixer_test_controlA(HMIXER mix, LPMIXERCONTROLA control)
details
.
cbDetails
=
sizeof
(
value
);
/* restore original value */
rc
=
mixerSetControlDetails
((
HMIXEROBJ
)
mix
,
&
details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
rc
=
mixerSetControlDetails
(
mix
,
&
details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerSetControlDetails(MIXER_SETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -287,7 +287,7 @@ static void mixer_test_controlA(HMIXER mix, LPMIXERCONTROLA control)
details
.
paDetails
=
&
value
;
details
.
cbDetails
=
sizeof
(
value
);
rc
=
mixerGetControlDetails
((
HMIXEROBJ
)
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
rc
=
mixerGetControlDetailsA
(
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetControlDetails(MIXER_GETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -310,7 +310,7 @@ static void mixer_test_controlA(HMIXER mix, LPMIXERCONTROLA control)
new_details
.
cbDetails
=
sizeof
(
new_value
);
/* change the control value by one step */
rc
=
mixerSetControlDetails
((
HMIXEROBJ
)
mix
,
&
new_details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
rc
=
mixerSetControlDetails
(
mix
,
&
new_details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerSetControlDetails(MIXER_SETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -326,7 +326,7 @@ static void mixer_test_controlA(HMIXER mix, LPMIXERCONTROLA control)
ret_details
.
cbDetails
=
sizeof
(
ret_value
);
/* read back the new control value */
rc
=
mixerGetControlDetails
((
HMIXEROBJ
)
mix
,
&
ret_details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
rc
=
mixerGetControlDetailsA
(
mix
,
&
ret_details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetControlDetails(MIXER_GETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -345,7 +345,7 @@ static void mixer_test_controlA(HMIXER mix, LPMIXERCONTROLA control)
details
.
cbDetails
=
sizeof
(
value
);
/* restore original value */
rc
=
mixerSetControlDetails
((
HMIXEROBJ
)
mix
,
&
details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
rc
=
mixerSetControlDetails
(
mix
,
&
details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerSetControlDetails(MIXER_SETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -361,7 +361,7 @@ static void mixer_test_controlA(HMIXER mix, LPMIXERCONTROLA control)
static
void
mixer_test_deviceA
(
int
device
)
{
MIXERCAPSA
capsA
;
HMIXER
mix
;
HMIXER
OBJ
mix
;
MMRESULT
rc
;
DWORD
d
,
s
,
ns
,
nc
;
...
...
@@ -391,7 +391,7 @@ static void mixer_test_deviceA(int device)
capsA
.
vDriverVersion
&
0xff
,
capsA
.
wMid
,
capsA
.
wPid
);
}
rc
=
mixerOpen
(
&
mix
,
device
,
0
,
0
,
0
);
rc
=
mixerOpen
((
HMIXER
*
)
&
mix
,
device
,
0
,
0
,
0
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerOpen: MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
...
...
@@ -399,8 +399,7 @@ static void mixer_test_deviceA(int device)
MIXERLINEA
mixerlineA
;
mixerlineA
.
cbStruct
=
0
;
mixerlineA
.
dwDestination
=
d
;
rc
=
mixerGetLineInfoA
((
HMIXEROBJ
)
mix
,
&
mixerlineA
,
MIXER_GETLINEINFOF_DESTINATION
);
rc
=
mixerGetLineInfoA
(
mix
,
&
mixerlineA
,
MIXER_GETLINEINFOF_DESTINATION
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"mixerGetLineInfoA(MIXER_GETLINEINFOF_DESTINATION): "
"MMSYSERR_INVALPARAM expected, got %s
\n
"
,
...
...
@@ -408,8 +407,7 @@ static void mixer_test_deviceA(int device)
mixerlineA
.
cbStruct
=
sizeof
(
mixerlineA
);
mixerlineA
.
dwDestination
=
capsA
.
cDestinations
;
rc
=
mixerGetLineInfoA
((
HMIXEROBJ
)
mix
,
&
mixerlineA
,
MIXER_GETLINEINFOF_DESTINATION
);
rc
=
mixerGetLineInfoA
(
mix
,
&
mixerlineA
,
MIXER_GETLINEINFOF_DESTINATION
);
ok
(
rc
==
MMSYSERR_INVALPARAM
||
rc
==
MIXERR_INVALLINE
,
"mixerGetLineInfoA(MIXER_GETLINEINFOF_DESTINATION): "
"MMSYSERR_INVALPARAM or MIXERR_INVALLINE expected, got %s
\n
"
,
...
...
@@ -417,8 +415,7 @@ static void mixer_test_deviceA(int device)
mixerlineA
.
cbStruct
=
sizeof
(
mixerlineA
);
mixerlineA
.
dwDestination
=
d
;
rc
=
mixerGetLineInfoA
((
HMIXEROBJ
)
mix
,
0
,
MIXER_GETLINEINFOF_DESTINATION
);
rc
=
mixerGetLineInfoA
(
mix
,
0
,
MIXER_GETLINEINFOF_DESTINATION
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"mixerGetLineInfoA(MIXER_GETLINEINFOF_DESTINATION): "
"MMSYSERR_INVALPARAM expected, got %s
\n
"
,
...
...
@@ -426,15 +423,14 @@ static void mixer_test_deviceA(int device)
mixerlineA
.
cbStruct
=
sizeof
(
mixerlineA
);
mixerlineA
.
dwDestination
=
d
;
rc
=
mixerGetLineInfoA
((
HMIXEROBJ
)
mix
,
&
mixerlineA
,
-
1
);
rc
=
mixerGetLineInfoA
(
mix
,
&
mixerlineA
,
-
1
);
ok
(
rc
==
MMSYSERR_INVALFLAG
,
"mixerGetLineInfoA(-1): MMSYSERR_INVALFLAG expected, got %s
\n
"
,
mmsys_error
(
rc
));
mixerlineA
.
cbStruct
=
sizeof
(
mixerlineA
);
mixerlineA
.
dwDestination
=
d
;
rc
=
mixerGetLineInfoA
((
HMIXEROBJ
)
mix
,
&
mixerlineA
,
MIXER_GETLINEINFOF_DESTINATION
);
rc
=
mixerGetLineInfoA
(
mix
,
&
mixerlineA
,
MIXER_GETLINEINFOF_DESTINATION
);
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
MMSYSERR_NODRIVER
,
"mixerGetLineInfoA(MIXER_GETLINEINFOF_DESTINATION): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
...
...
@@ -468,8 +464,7 @@ static void mixer_test_deviceA(int device)
mixerlineA
.
cbStruct
=
sizeof
(
mixerlineA
);
mixerlineA
.
dwDestination
=
d
;
mixerlineA
.
dwSource
=
s
;
rc
=
mixerGetLineInfoA
((
HMIXEROBJ
)
mix
,
&
mixerlineA
,
MIXER_GETLINEINFOF_SOURCE
);
rc
=
mixerGetLineInfoA
(
mix
,
&
mixerlineA
,
MIXER_GETLINEINFOF_SOURCE
);
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
MMSYSERR_NODRIVER
,
"mixerGetLineInfoA(MIXER_GETLINEINFOF_SOURCE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
...
...
@@ -506,14 +501,13 @@ static void mixer_test_deviceA(int device)
if
(
array
)
{
memset
(
&
controls
,
0
,
sizeof
(
controls
));
rc
=
mixerGetLineControlsA
((
HMIXEROBJ
)
mix
,
0
,
MIXER_GETLINECONTROLSF_ALL
);
rc
=
mixerGetLineControlsA
(
mix
,
0
,
MIXER_GETLINECONTROLSF_ALL
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"mixerGetLineControlsA(MIXER_GETLINECONTROLSF_ALL): "
"MMSYSERR_INVALPARAM expected, got %s
\n
"
,
mmsys_error
(
rc
));
rc
=
mixerGetLineControlsA
((
HMIXEROBJ
)
mix
,
&
controls
,
-
1
);
rc
=
mixerGetLineControlsA
(
mix
,
&
controls
,
-
1
);
ok
(
rc
==
MMSYSERR_INVALFLAG
||
rc
==
MMSYSERR_INVALPARAM
,
"mixerGetLineControlsA(-1): "
"MMSYSERR_INVALFLAG or MMSYSERR_INVALPARAM expected, got %s
\n
"
,
...
...
@@ -528,8 +522,7 @@ static void mixer_test_deviceA(int device)
/* FIXME: do MIXER_GETLINECONTROLSF_ONEBYID
* and MIXER_GETLINECONTROLSF_ONEBYTYPE
*/
rc
=
mixerGetLineControlsA
((
HMIXEROBJ
)
mix
,
&
controls
,
MIXER_GETLINECONTROLSF_ALL
);
rc
=
mixerGetLineControlsA
(
mix
,
&
controls
,
MIXER_GETLINECONTROLSF_ALL
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetLineControlsA(MIXER_GETLINECONTROLSF_ALL): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
...
...
@@ -563,11 +556,11 @@ static void mixer_test_deviceA(int device)
}
}
}
test_mixerClose
(
mix
);
test_mixerClose
(
(
HMIXER
)
mix
);
}
}
static
void
mixer_test_controlW
(
HMIXER
mix
,
LPMIXERCONTROLW
control
)
static
void
mixer_test_controlW
(
HMIXER
OBJ
mix
,
MIXERCONTROLW
*
control
)
{
MMRESULT
rc
;
...
...
@@ -584,7 +577,7 @@ static void mixer_test_controlW(HMIXER mix, LPMIXERCONTROLW control)
details
.
cbDetails
=
sizeof
(
value
);
/* read the current control value */
rc
=
mixerGetControlDetails
((
HMIXEROBJ
)
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
rc
=
mixerGetControlDetailsW
(
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetControlDetails(MIXER_GETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -607,7 +600,7 @@ static void mixer_test_controlW(HMIXER mix, LPMIXERCONTROLW control)
new_details
.
cbDetails
=
sizeof
(
new_value
);
/* change the control value by one step */
rc
=
mixerSetControlDetails
((
HMIXEROBJ
)
mix
,
&
new_details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
rc
=
mixerSetControlDetails
(
mix
,
&
new_details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerSetControlDetails(MIXER_SETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -623,7 +616,7 @@ static void mixer_test_controlW(HMIXER mix, LPMIXERCONTROLW control)
ret_details
.
cbDetails
=
sizeof
(
ret_value
);
/* read back the new control value */
rc
=
mixerGetControlDetails
((
HMIXEROBJ
)
mix
,
&
ret_details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
rc
=
mixerGetControlDetailsW
(
mix
,
&
ret_details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetControlDetails(MIXER_GETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -642,7 +635,7 @@ static void mixer_test_controlW(HMIXER mix, LPMIXERCONTROLW control)
details
.
cbDetails
=
sizeof
(
value
);
/* restore original value */
rc
=
mixerSetControlDetails
((
HMIXEROBJ
)
mix
,
&
details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
rc
=
mixerSetControlDetails
(
mix
,
&
details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerSetControlDetails(MIXER_SETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -663,7 +656,7 @@ static void mixer_test_controlW(HMIXER mix, LPMIXERCONTROLW control)
details
.
paDetails
=
&
value
;
details
.
cbDetails
=
sizeof
(
value
);
rc
=
mixerGetControlDetails
((
HMIXEROBJ
)
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
rc
=
mixerGetControlDetailsW
(
mix
,
&
details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetControlDetails(MIXER_GETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -686,7 +679,7 @@ static void mixer_test_controlW(HMIXER mix, LPMIXERCONTROLW control)
new_details
.
cbDetails
=
sizeof
(
new_value
);
/* change the control value by one step */
rc
=
mixerSetControlDetails
((
HMIXEROBJ
)
mix
,
&
new_details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
rc
=
mixerSetControlDetails
(
mix
,
&
new_details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerSetControlDetails(MIXER_SETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -702,7 +695,7 @@ static void mixer_test_controlW(HMIXER mix, LPMIXERCONTROLW control)
ret_details
.
cbDetails
=
sizeof
(
ret_value
);
/* read back the new control value */
rc
=
mixerGetControlDetails
((
HMIXEROBJ
)
mix
,
&
ret_details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
rc
=
mixerGetControlDetailsW
(
mix
,
&
ret_details
,
MIXER_GETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetControlDetails(MIXER_GETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -721,7 +714,7 @@ static void mixer_test_controlW(HMIXER mix, LPMIXERCONTROLW control)
details
.
cbDetails
=
sizeof
(
value
);
/* restore original value */
rc
=
mixerSetControlDetails
((
HMIXEROBJ
)
mix
,
&
details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
rc
=
mixerSetControlDetails
(
mix
,
&
details
,
MIXER_SETCONTROLDETAILSF_VALUE
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerSetControlDetails(MIXER_SETCONTROLDETAILSF_VALUE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -737,7 +730,7 @@ static void mixer_test_controlW(HMIXER mix, LPMIXERCONTROLW control)
static
void
mixer_test_deviceW
(
int
device
)
{
MIXERCAPSW
capsW
;
HMIXER
mix
;
HMIXER
OBJ
mix
;
MMRESULT
rc
;
DWORD
d
,
s
,
ns
,
nc
;
char
szShortName
[
MIXER_SHORT_NAME_CHARS
];
...
...
@@ -774,7 +767,7 @@ static void mixer_test_deviceW(int device)
}
rc
=
mixerOpen
(
&
mix
,
device
,
0
,
0
,
0
);
rc
=
mixerOpen
((
HMIXER
*
)
&
mix
,
device
,
0
,
0
,
0
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerOpen: MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
...
...
@@ -782,8 +775,7 @@ static void mixer_test_deviceW(int device)
MIXERLINEW
mixerlineW
;
mixerlineW
.
cbStruct
=
0
;
mixerlineW
.
dwDestination
=
d
;
rc
=
mixerGetLineInfoW
((
HMIXEROBJ
)
mix
,
&
mixerlineW
,
MIXER_GETLINEINFOF_DESTINATION
);
rc
=
mixerGetLineInfoW
(
mix
,
&
mixerlineW
,
MIXER_GETLINEINFOF_DESTINATION
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"mixerGetLineInfoW(MIXER_GETLINEINFOF_DESTINATION): "
"MMSYSERR_INVALPARAM expected, got %s
\n
"
,
...
...
@@ -791,8 +783,7 @@ static void mixer_test_deviceW(int device)
mixerlineW
.
cbStruct
=
sizeof
(
mixerlineW
);
mixerlineW
.
dwDestination
=
capsW
.
cDestinations
;
rc
=
mixerGetLineInfoW
((
HMIXEROBJ
)
mix
,
&
mixerlineW
,
MIXER_GETLINEINFOF_DESTINATION
);
rc
=
mixerGetLineInfoW
(
mix
,
&
mixerlineW
,
MIXER_GETLINEINFOF_DESTINATION
);
ok
(
rc
==
MMSYSERR_INVALPARAM
||
rc
==
MIXERR_INVALLINE
,
"mixerGetLineInfoW(MIXER_GETLINEINFOF_DESTINATION): "
"MMSYSERR_INVALPARAM or MIXERR_INVALLINE expected, got %s
\n
"
,
...
...
@@ -800,8 +791,7 @@ static void mixer_test_deviceW(int device)
mixerlineW
.
cbStruct
=
sizeof
(
mixerlineW
);
mixerlineW
.
dwDestination
=
d
;
rc
=
mixerGetLineInfoW
((
HMIXEROBJ
)
mix
,
0
,
MIXER_GETLINEINFOF_DESTINATION
);
rc
=
mixerGetLineInfoW
(
mix
,
0
,
MIXER_GETLINEINFOF_DESTINATION
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"mixerGetLineInfoW(MIXER_GETLINEINFOF_DESTINATION): "
"MMSYSERR_INVALPARAM expected, got %s
\n
"
,
...
...
@@ -809,15 +799,14 @@ static void mixer_test_deviceW(int device)
mixerlineW
.
cbStruct
=
sizeof
(
mixerlineW
);
mixerlineW
.
dwDestination
=
d
;
rc
=
mixerGetLineInfoW
((
HMIXEROBJ
)
mix
,
&
mixerlineW
,
-
1
);
rc
=
mixerGetLineInfoW
(
mix
,
&
mixerlineW
,
-
1
);
ok
(
rc
==
MMSYSERR_INVALFLAG
,
"mixerGetLineInfoW(-1): MMSYSERR_INVALFLAG expected, got %s
\n
"
,
mmsys_error
(
rc
));
mixerlineW
.
cbStruct
=
sizeof
(
mixerlineW
);
mixerlineW
.
dwDestination
=
d
;
rc
=
mixerGetLineInfoW
((
HMIXEROBJ
)
mix
,
&
mixerlineW
,
MIXER_GETLINEINFOF_DESTINATION
);
rc
=
mixerGetLineInfoW
(
mix
,
&
mixerlineW
,
MIXER_GETLINEINFOF_DESTINATION
);
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
MMSYSERR_NODRIVER
,
"mixerGetLineInfoW(MIXER_GETLINEINFOF_DESTINATION): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
...
...
@@ -858,8 +847,7 @@ static void mixer_test_deviceW(int device)
mixerlineW
.
cbStruct
=
sizeof
(
mixerlineW
);
mixerlineW
.
dwDestination
=
d
;
mixerlineW
.
dwSource
=
s
;
rc
=
mixerGetLineInfoW
((
HMIXEROBJ
)
mix
,
&
mixerlineW
,
MIXER_GETLINEINFOF_SOURCE
);
rc
=
mixerGetLineInfoW
(
mix
,
&
mixerlineW
,
MIXER_GETLINEINFOF_SOURCE
);
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
MMSYSERR_NODRIVER
,
"mixerGetLineInfoW(MIXER_GETLINEINFOF_SOURCE): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
...
...
@@ -902,16 +890,14 @@ static void mixer_test_deviceW(int device)
array
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
mixerlineW
.
cControls
*
sizeof
(
MIXERCONTROLW
));
if
(
array
)
{
rc
=
mixerGetLineControlsW
((
HMIXEROBJ
)
mix
,
0
,
MIXER_GETLINECONTROLSF_ALL
);
rc
=
mixerGetLineControlsW
(
mix
,
0
,
MIXER_GETLINECONTROLSF_ALL
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"mixerGetLineControlsW(MIXER_GETLINECONTROLSF_ALL): "
"MMSYSERR_INVALPARAM expected, got %s
\n
"
,
mmsys_error
(
rc
));
rc
=
mixerGetLineControlsW
((
HMIXEROBJ
)
mix
,
&
controls
,
-
1
);
rc
=
mixerGetLineControlsW
(
mix
,
&
controls
,
-
1
);
ok
(
rc
==
MMSYSERR_INVALFLAG
||
rc
==
MMSYSERR_INVALPARAM
,
"mixerGetLineControls
A
(-1): "
"mixerGetLineControls
W
(-1): "
"MMSYSERR_INVALFLAG or MMSYSERR_INVALPARAM expected, got %s
\n
"
,
mmsys_error
(
rc
));
...
...
@@ -924,8 +910,7 @@ static void mixer_test_deviceW(int device)
/* FIXME: do MIXER_GETLINECONTROLSF_ONEBYID
* and MIXER_GETLINECONTROLSF_ONEBYTYPE
*/
rc
=
mixerGetLineControlsW
((
HMIXEROBJ
)
mix
,
&
controls
,
MIXER_GETLINECONTROLSF_ALL
);
rc
=
mixerGetLineControlsW
(
mix
,
&
controls
,
MIXER_GETLINECONTROLSF_ALL
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetLineControlsW(MIXER_GETLINECONTROLSF_ALL): "
"MMSYSERR_NOERROR expected, got %s
\n
"
,
...
...
@@ -962,7 +947,7 @@ static void mixer_test_deviceW(int device)
}
}
}
test_mixerClose
(
mix
);
test_mixerClose
(
(
HMIXER
)
mix
);
}
}
...
...
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