Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
99aa613f
Commit
99aa613f
authored
Nov 13, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Implement segment state repeat and looping.
parent
eada4078
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
segmentstate.c
dlls/dmime/segmentstate.c
+20
-7
No files found.
dlls/dmime/segmentstate.c
View file @
99aa613f
...
@@ -53,6 +53,7 @@ struct segment_state
...
@@ -53,6 +53,7 @@ struct segment_state
MUSIC_TIME
end_point
;
MUSIC_TIME
end_point
;
MUSIC_TIME
played
;
MUSIC_TIME
played
;
BOOL
auto_download
;
BOOL
auto_download
;
DWORD
repeats
;
struct
list
tracks
;
struct
list
tracks
;
};
};
...
@@ -234,6 +235,7 @@ HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time
...
@@ -234,6 +235,7 @@ HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time
This
->
start_time
=
start_time
;
This
->
start_time
=
start_time
;
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectMusicSegment_GetStartPoint
(
segment
,
&
This
->
start_point
);
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectMusicSegment_GetStartPoint
(
segment
,
&
This
->
start_point
);
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectMusicSegment_GetLength
(
segment
,
&
This
->
end_point
);
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectMusicSegment_GetLength
(
segment
,
&
This
->
end_point
);
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectMusicSegment_GetRepeats
(
segment
,
&
This
->
repeats
);
for
(
i
=
0
;
SUCCEEDED
(
hr
);
i
++
)
for
(
i
=
0
;
SUCCEEDED
(
hr
);
i
++
)
{
{
...
@@ -311,17 +313,28 @@ static HRESULT segment_state_play_chunk(struct segment_state *This, IDirectMusic
...
@@ -311,17 +313,28 @@ static HRESULT segment_state_play_chunk(struct segment_state *This, IDirectMusic
time
+
duration
,
&
next_time
)))
time
+
duration
,
&
next_time
)))
return
hr
;
return
hr
;
if
((
hr
=
segment_state_play_until
(
This
,
performance
,
next_time
,
track_flags
))
==
S_FALSE
)
while
((
hr
=
segment_state_play_until
(
This
,
performance
,
next_time
,
track_flags
))
==
S_FALSE
)
{
{
MUSIC_TIME
end_time
=
This
->
start_time
+
This
->
played
;
if
(
!
This
->
repeats
)
if
(
FAILED
(
hr
=
performance_send_segment_end
(
performance
,
end_time
,
iface
,
FALSE
)))
{
{
ERR
(
"Failed to send segment end, hr %#lx
\n
"
,
hr
);
MUSIC_TIME
end_time
=
This
->
start_time
+
This
->
played
;
return
hr
;
if
(
FAILED
(
hr
=
performance_send_segment_end
(
performance
,
end_time
,
iface
,
FALSE
)))
{
ERR
(
"Failed to send segment end, hr %#lx
\n
"
,
hr
);
return
hr
;
}
return
S_FALSE
;
}
}
return
S_FALSE
;
if
(
FAILED
(
hr
=
IDirectMusicSegment_GetLoopPoints
(
This
->
segment
,
&
This
->
played
,
&
This
->
end_point
)))
break
;
This
->
start_time
+=
This
->
end_point
-
This
->
start_point
;
This
->
repeats
--
;
if
(
next_time
<=
This
->
start_time
||
This
->
end_point
<=
This
->
start_point
)
break
;
}
}
return
S_OK
;
return
S_OK
;
...
...
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