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
c92d0101
Commit
c92d0101
authored
Dec 17, 2022
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Implement the IDirectMusicSegment8_Clone() method.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53941
parent
354ccf3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
5 deletions
+45
-5
segment.c
dlls/dmime/segment.c
+45
-5
No files found.
dlls/dmime/segment.c
View file @
c92d0101
...
...
@@ -35,6 +35,8 @@ typedef struct IDirectMusicSegment8Impl {
struct
list
Tracks
;
}
IDirectMusicSegment8Impl
;
IDirectMusicSegment8Impl
*
create_segment
(
void
);
static
inline
IDirectMusicSegment8Impl
*
impl_from_IDirectMusicSegment8
(
IDirectMusicSegment8
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectMusicSegment8Impl
,
IDirectMusicSegment8_iface
);
...
...
@@ -410,12 +412,50 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_SetParam(IDirectMusicSegment8 *if
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicSegment8Impl_Clone
(
IDirectMusicSegment8
*
iface
,
MUSIC_TIME
mtStart
,
MUSIC_TIME
mtEnd
,
IDirectMusicSegment
**
ppS
egment
)
static
HRESULT
WINAPI
IDirectMusicSegment8Impl_Clone
(
IDirectMusicSegment8
*
iface
,
MUSIC_TIME
start
,
MUSIC_TIME
end
,
IDirectMusicSegment
**
s
egment
)
{
IDirectMusicSegment8Impl
*
This
=
impl_from_IDirectMusicSegment8
(
iface
);
FIXME
(
"(%p, %ld, %ld, %p): stub
\n
"
,
This
,
mtStart
,
mtEnd
,
ppSegment
);
return
S_OK
;
IDirectMusicSegment8Impl
*
This
=
impl_from_IDirectMusicSegment8
(
iface
);
IDirectMusicSegment8Impl
*
clone
;
IDirectMusicTrack
*
track
;
DMUS_PRIVATE_SEGMENT_TRACK
*
track_item
,
*
cloned_item
;
HRESULT
hr
;
BOOL
track_clone_fail
=
FALSE
;
TRACE
(
"(%p, %ld, %ld, %p)
\n
"
,
This
,
start
,
end
,
segment
);
if
(
!
segment
)
return
E_POINTER
;
if
(
!
(
clone
=
create_segment
()))
{
*
segment
=
NULL
;
return
E_OUTOFMEMORY
;
}
clone
->
header
=
This
->
header
;
clone
->
pGraph
=
This
->
pGraph
;
if
(
clone
->
pGraph
)
IDirectMusicGraph_AddRef
(
clone
->
pGraph
);
LIST_FOR_EACH_ENTRY
(
track_item
,
&
This
->
Tracks
,
DMUS_PRIVATE_SEGMENT_TRACK
,
entry
)
{
if
(
SUCCEEDED
(
hr
=
IDirectMusicTrack_Clone
(
track_item
->
pTrack
,
start
,
end
,
&
track
)))
{
if
((
cloned_item
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
cloned_item
))))
{
cloned_item
->
dwGroupBits
=
track_item
->
dwGroupBits
;
cloned_item
->
flags
=
track_item
->
flags
;
cloned_item
->
pTrack
=
track
;
list_add_tail
(
&
clone
->
Tracks
,
&
cloned_item
->
entry
);
continue
;
}
else
{
IDirectMusicTrack_Release
(
track
);
}
}
WARN
(
"Failed to clone track %p: %#lx
\n
"
,
track_item
->
pTrack
,
hr
);
track_clone_fail
=
TRUE
;
}
*
segment
=
(
IDirectMusicSegment
*
)
&
clone
->
IDirectMusicSegment8_iface
;
return
track_clone_fail
?
S_FALSE
:
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicSegment8Impl_SetStartPoint
(
IDirectMusicSegment8
*
iface
,
...
...
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