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
274427aa
Commit
274427aa
authored
Nov 19, 2019
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmstyle: Implement IsParamSupported() for the Audition track.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
de11d172
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
19 deletions
+29
-19
auditiontrack.c
dlls/dmstyle/auditiontrack.c
+20
-8
dmstyle.c
dlls/dmstyle/tests/dmstyle.c
+9
-11
No files found.
dlls/dmstyle/auditiontrack.c
View file @
274427aa
...
...
@@ -137,18 +137,30 @@ static HRESULT WINAPI audition_track_SetParam(IDirectMusicTrack8 *iface, REFGUID
return
S_OK
;
}
static
HRESULT
WINAPI
audition_track_IsParamSupported
(
IDirectMusicTrack8
*
iface
,
REFGUID
rguidT
ype
)
static
HRESULT
WINAPI
audition_track_IsParamSupported
(
IDirectMusicTrack8
*
iface
,
REFGUID
t
ype
)
{
IDirectMusicAuditionTrack
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
IDirectMusicAuditionTrack
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
static
const
GUID
*
valid
[]
=
{
&
GUID_DisableTimeSig
,
&
GUID_EnableTimeSig
,
&
GUID_SeedVariations
,
&
GUID_Valid_Start_Time
,
&
GUID_Variations
};
unsigned
int
i
;
TRACE
(
"(%p, %s)
\n
"
,
This
,
debugstr_dmguid
(
rguidType
));
TRACE
(
"(%p, %s)
\n
"
,
This
,
debugstr_dmguid
(
type
));
if
(
!
type
)
return
E_POINTER
;
if
(
!
rguidType
)
return
E_POINTER
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
valid
);
i
++
)
if
(
IsEqualGUID
(
type
,
valid
[
i
]))
return
S_OK
;
/* didn't find any params */
TRACE
(
"param unsupported
\n
"
);
return
DMUS_E_TYPE_UNSUPPORTED
;
TRACE
(
"param unsupported
\n
"
);
return
DMUS_E_TYPE_UNSUPPORTED
;
}
static
HRESULT
WINAPI
audition_track_AddNotificationType
(
IDirectMusicTrack8
*
iface
,
...
...
dlls/dmstyle/tests/dmstyle.c
View file @
274427aa
...
...
@@ -286,16 +286,15 @@ static void test_track(void)
const
char
*
name
;
BOOL
has_save
;
BOOL
has_join
;
/* bitfield
s
with supported param types */
/* bitfield with supported param types */
unsigned
int
has_params
;
unsigned
int
todo_params
;
}
class
[]
=
{
{
X
(
DirectMusicAuditionTrack
),
TRUE
,
FALSE
,
0x18204200
,
0x18204200
},
{
X
(
DirectMusicChordTrack
),
TRUE
,
TRUE
,
0x100002
,
0
},
{
X
(
DirectMusicCommandTrack
),
TRUE
,
TRUE
,
0x38
,
0
},
{
X
(
DirectMusicMotifTrack
),
FALSE
,
FALSE
,
0x8204200
,
0
},
{
X
(
DirectMusicMuteTrack
),
TRUE
,
FALSE
,
0x40000
,
0
},
{
X
(
DirectMusicStyleTrack
),
FALSE
,
TRUE
,
0x1224200
,
0
},
{
X
(
DirectMusicAuditionTrack
),
TRUE
,
FALSE
,
0x18204200
},
{
X
(
DirectMusicChordTrack
),
TRUE
,
TRUE
,
0x100002
},
{
X
(
DirectMusicCommandTrack
),
TRUE
,
TRUE
,
0x38
},
{
X
(
DirectMusicMotifTrack
),
FALSE
,
FALSE
,
0x8204200
},
{
X
(
DirectMusicMuteTrack
),
TRUE
,
FALSE
,
0x40000
},
{
X
(
DirectMusicStyleTrack
),
FALSE
,
TRUE
,
0x1224200
},
};
#undef X
unsigned
int
i
,
j
;
...
...
@@ -329,9 +328,8 @@ static void test_track(void)
for
(
j
=
0
;
j
<
ARRAY_SIZE
(
param_types
);
j
++
)
{
hr
=
IDirectMusicTrack8_IsParamSupported
(
dmt8
,
param_types
[
j
].
type
);
if
(
class
[
i
].
has_params
&
(
1
<<
j
))
todo_wine_if
(
class
[
i
].
todo_params
&
(
1
<<
j
))
ok
(
hr
==
S_OK
,
"IsParamSupported(%s) failed: %08x, expected S_OK
\n
"
,
param_types
[
j
].
name
,
hr
);
ok
(
hr
==
S_OK
,
"IsParamSupported(%s) failed: %08x, expected S_OK
\n
"
,
param_types
[
j
].
name
,
hr
);
else
ok
(
hr
==
DMUS_E_TYPE_UNSUPPORTED
,
"IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED
\n
"
,
...
...
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