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
428eb3e8
Commit
428eb3e8
authored
Sep 04, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Add a IDirectMusicTool interface to the performance.
parent
2e25af4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
4 deletions
+91
-4
performance.c
dlls/dmime/performance.c
+89
-0
dmime.c
dlls/dmime/tests/dmime.c
+2
-4
No files found.
dlls/dmime/performance.c
View file @
428eb3e8
...
...
@@ -38,6 +38,7 @@ struct performance
{
IDirectMusicPerformance8
IDirectMusicPerformance8_iface
;
IDirectMusicGraph
IDirectMusicGraph_iface
;
IDirectMusicTool
IDirectMusicTool_iface
;
LONG
ref
;
IDirectMusic8
*
dmusic
;
IDirectSound
*
dsound
;
...
...
@@ -276,6 +277,13 @@ static HRESULT WINAPI performance_QueryInterface(IDirectMusicPerformance8 *iface
return
S_OK
;
}
if
(
IsEqualGUID
(
riid
,
&
IID_IDirectMusicTool
))
{
*
ret_iface
=
&
This
->
IDirectMusicTool_iface
;
IDirectMusicTool_AddRef
(
&
This
->
IDirectMusicTool_iface
);
return
S_OK
;
}
*
ret_iface
=
NULL
;
WARN
(
"(%p, %s, %p): not found
\n
"
,
iface
,
debugstr_dmguid
(
riid
),
ret_iface
);
return
E_NOINTERFACE
;
...
...
@@ -1322,6 +1330,86 @@ static const IDirectMusicGraphVtbl performance_graph_vtbl =
performance_graph_RemoveTool
,
};
static
inline
struct
performance
*
impl_from_IDirectMusicTool
(
IDirectMusicTool
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
performance
,
IDirectMusicTool_iface
);
}
static
HRESULT
WINAPI
performance_tool_QueryInterface
(
IDirectMusicTool
*
iface
,
REFIID
riid
,
void
**
ret_iface
)
{
struct
performance
*
This
=
impl_from_IDirectMusicTool
(
iface
);
return
IDirectMusicPerformance8_QueryInterface
(
&
This
->
IDirectMusicPerformance8_iface
,
riid
,
ret_iface
);
}
static
ULONG
WINAPI
performance_tool_AddRef
(
IDirectMusicTool
*
iface
)
{
struct
performance
*
This
=
impl_from_IDirectMusicTool
(
iface
);
return
IDirectMusicPerformance8_AddRef
(
&
This
->
IDirectMusicPerformance8_iface
);
}
static
ULONG
WINAPI
performance_tool_Release
(
IDirectMusicTool
*
iface
)
{
struct
performance
*
This
=
impl_from_IDirectMusicTool
(
iface
);
return
IDirectMusicPerformance8_Release
(
&
This
->
IDirectMusicPerformance8_iface
);
}
static
HRESULT
WINAPI
performance_tool_Init
(
IDirectMusicTool
*
iface
,
IDirectMusicGraph
*
graph
)
{
struct
performance
*
This
=
impl_from_IDirectMusicTool
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
graph
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
performance_tool_GetMsgDeliveryType
(
IDirectMusicTool
*
iface
,
DWORD
*
type
)
{
struct
performance
*
This
=
impl_from_IDirectMusicTool
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
type
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
performance_tool_GetMediaTypeArraySize
(
IDirectMusicTool
*
iface
,
DWORD
*
size
)
{
struct
performance
*
This
=
impl_from_IDirectMusicTool
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
size
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
performance_tool_GetMediaTypes
(
IDirectMusicTool
*
iface
,
DWORD
**
types
,
DWORD
size
)
{
struct
performance
*
This
=
impl_from_IDirectMusicTool
(
iface
);
FIXME
(
"(%p, %p, %lu): stub
\n
"
,
This
,
types
,
size
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
performance_tool_ProcessPMsg
(
IDirectMusicTool
*
iface
,
IDirectMusicPerformance
*
performance
,
DMUS_PMSG
*
msg
)
{
struct
performance
*
This
=
impl_from_IDirectMusicTool
(
iface
);
FIXME
(
"(%p, %p, %p): stub
\n
"
,
This
,
performance
,
msg
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
performance_tool_Flush
(
IDirectMusicTool
*
iface
,
IDirectMusicPerformance
*
performance
,
DMUS_PMSG
*
msg
,
REFERENCE_TIME
time
)
{
struct
performance
*
This
=
impl_from_IDirectMusicTool
(
iface
);
FIXME
(
"(%p, %p, %p, %I64d): stub
\n
"
,
This
,
performance
,
msg
,
time
);
return
E_NOTIMPL
;
}
static
const
IDirectMusicToolVtbl
performance_tool_vtbl
=
{
performance_tool_QueryInterface
,
performance_tool_AddRef
,
performance_tool_Release
,
performance_tool_Init
,
performance_tool_GetMsgDeliveryType
,
performance_tool_GetMediaTypeArraySize
,
performance_tool_GetMediaTypes
,
performance_tool_ProcessPMsg
,
performance_tool_Flush
,
};
/* for ClassFactory */
HRESULT
create_dmperformance
(
REFIID
iid
,
void
**
ret_iface
)
{
...
...
@@ -1334,6 +1422,7 @@ HRESULT create_dmperformance(REFIID iid, void **ret_iface)
if
(
!
(
obj
=
calloc
(
1
,
sizeof
(
*
obj
))))
return
E_OUTOFMEMORY
;
obj
->
IDirectMusicPerformance8_iface
.
lpVtbl
=
&
performance_vtbl
;
obj
->
IDirectMusicGraph_iface
.
lpVtbl
=
&
performance_graph_vtbl
;
obj
->
IDirectMusicTool_iface
.
lpVtbl
=
&
performance_tool_vtbl
;
obj
->
ref
=
1
;
obj
->
pDefaultPath
=
NULL
;
...
...
dlls/dmime/tests/dmime.c
View file @
428eb3e8
...
...
@@ -1489,10 +1489,9 @@ static void test_performance_tool(void)
check_interface
(
performance
,
&
IID_IDirectMusicTool8
,
FALSE
);
hr
=
IDirectMusicPerformance_QueryInterface
(
performance
,
&
IID_IDirectMusicTool
,
(
void
**
)
&
tool
);
todo_wine
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
goto
skip_tool
;
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicPerformance_QueryInterface
(
performance
,
&
IID_IDirectMusicGraph
,
(
void
**
)
&
graph
);
todo_wine
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicTool_Init
(
tool
,
graph
);
ok
(
hr
==
E_NOTIMPL
,
"got %#lx
\n
"
,
hr
);
...
...
@@ -1514,7 +1513,6 @@ static void test_performance_tool(void)
IDirectMusicGraph_Release
(
graph
);
IDirectMusicTool_Release
(
tool
);
skip_tool:
IDirectMusicPerformance_Release
(
performance
);
}
...
...
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