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
eada4078
Commit
eada4078
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: Split segment_state_play_chunk helper.
parent
8f3980fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
segmentstate.c
dlls/dmime/segmentstate.c
+24
-12
No files found.
dlls/dmime/segmentstate.c
View file @
eada4078
...
...
@@ -269,22 +269,15 @@ HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time
return
hr
;
}
static
HRESULT
segment_state_play_
chunk
(
struct
segment_state
*
This
,
IDirectMusicPerformance8
*
performance
,
REFERENCE_TIME
duration
,
DWORD
track_flags
)
static
HRESULT
segment_state_play_
until
(
struct
segment_state
*
This
,
IDirectMusicPerformance8
*
performance
,
MUSIC_TIME
end_time
,
DWORD
track_flags
)
{
IDirectMusicSegmentState
*
iface
=
(
IDirectMusicSegmentState
*
)
&
This
->
IDirectMusicSegmentState8_iface
;
MUSIC_TIME
next_time
,
played
;
struct
track_entry
*
entry
;
REFERENCE_TIME
time
;
HRESULT
hr
=
S_OK
;
MUSIC_TIME
played
;
if
(
FAILED
(
hr
=
IDirectMusicPerformance8_MusicToReferenceTime
(
performance
,
This
->
start_time
+
This
->
played
,
&
time
)))
return
hr
;
if
(
FAILED
(
hr
=
IDirectMusicPerformance8_ReferenceToMusicTime
(
performance
,
time
+
duration
,
&
next_time
)))
return
hr
;
played
=
min
(
next_time
-
This
->
start_time
,
This
->
end_point
-
This
->
start_point
);
played
=
min
(
end_time
-
This
->
start_time
,
This
->
end_point
-
This
->
start_point
);
LIST_FOR_EACH_ENTRY
(
entry
,
&
This
->
tracks
,
struct
track_entry
,
entry
)
{
...
...
@@ -299,7 +292,26 @@ static HRESULT segment_state_play_chunk(struct segment_state *This, IDirectMusic
}
This
->
played
=
played
;
if
(
This
->
start_point
+
This
->
played
>=
This
->
end_point
)
if
(
This
->
start_point
+
This
->
played
>=
This
->
end_point
)
return
S_FALSE
;
return
S_OK
;
}
static
HRESULT
segment_state_play_chunk
(
struct
segment_state
*
This
,
IDirectMusicPerformance8
*
performance
,
REFERENCE_TIME
duration
,
DWORD
track_flags
)
{
IDirectMusicSegmentState
*
iface
=
(
IDirectMusicSegmentState
*
)
&
This
->
IDirectMusicSegmentState8_iface
;
MUSIC_TIME
next_time
;
REFERENCE_TIME
time
;
HRESULT
hr
;
if
(
FAILED
(
hr
=
IDirectMusicPerformance8_MusicToReferenceTime
(
performance
,
This
->
start_time
+
This
->
played
,
&
time
)))
return
hr
;
if
(
FAILED
(
hr
=
IDirectMusicPerformance8_ReferenceToMusicTime
(
performance
,
time
+
duration
,
&
next_time
)))
return
hr
;
if
((
hr
=
segment_state_play_until
(
This
,
performance
,
next_time
,
track_flags
))
==
S_FALSE
)
{
MUSIC_TIME
end_time
=
This
->
start_time
+
This
->
played
;
...
...
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