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
29940435
Commit
29940435
authored
Oct 26, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Support playing secondary and control segments.
parent
8f9faf88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
performance.c
dlls/dmime/performance.c
+15
-3
No files found.
dlls/dmime/performance.c
View file @
29940435
...
...
@@ -78,6 +78,7 @@ struct performance
BOOL
notification_segment
;
IDirectMusicSegment
*
primary_segment
;
IDirectMusicSegment
*
control_segment
;
};
struct
message
...
...
@@ -346,6 +347,12 @@ static void performance_set_primary_segment(struct performance *This, IDirectMus
if
((
This
->
primary_segment
=
segment
))
IDirectMusicSegment_AddRef
(
This
->
primary_segment
);
}
static
void
performance_set_control_segment
(
struct
performance
*
This
,
IDirectMusicSegment
*
segment
)
{
if
(
This
->
control_segment
)
IDirectMusicSegment_Release
(
This
->
control_segment
);
if
((
This
->
control_segment
=
segment
))
IDirectMusicSegment_AddRef
(
This
->
control_segment
);
}
/* IDirectMusicPerformance8 IUnknown part: */
static
HRESULT
WINAPI
performance_QueryInterface
(
IDirectMusicPerformance8
*
iface
,
REFIID
riid
,
void
**
ret_iface
)
{
...
...
@@ -1221,6 +1228,7 @@ static HRESULT WINAPI performance_CloseDown(IDirectMusicPerformance8 *iface)
}
performance_set_primary_segment
(
This
,
NULL
);
performance_set_control_segment
(
This
,
NULL
);
if
(
This
->
master_clock
)
{
...
...
@@ -1333,6 +1341,7 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface,
WCHAR
*
segment_name
,
IUnknown
*
transition
,
DWORD
segment_flags
,
INT64
start_time
,
IDirectMusicSegmentState
**
segment_state
,
IUnknown
*
from
,
IUnknown
*
audio_path
)
{
BOOL
primary
=
!
(
segment_flags
&
DMUS_SEGF_SECONDARY
),
control
=
(
segment_flags
&
DMUS_SEGF_CONTROL
);
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
IDirectMusicSegmentState
*
state
;
IDirectMusicSegment
*
segment
;
...
...
@@ -1351,12 +1360,14 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface,
EnterCriticalSection
(
&
This
->
safe
);
performance_set_primary_segment
(
This
,
segment
);
if
(
primary
)
performance_set_primary_segment
(
This
,
segment
);
if
(
control
)
performance_set_control_segment
(
This
,
segment
);
if
((
!
(
music_time
=
start_time
)
&&
FAILED
(
hr
=
IDirectMusicPerformance8_GetTime
(
iface
,
NULL
,
&
music_time
)))
||
FAILED
(
hr
=
segment_state_create
(
segment
,
music_time
,
iface
,
&
state
)))
{
performance_set_primary_segment
(
This
,
NULL
);
if
(
primary
)
performance_set_primary_segment
(
This
,
NULL
);
if
(
control
)
performance_set_control_segment
(
This
,
NULL
);
LeaveCriticalSection
(
&
This
->
safe
);
IDirectMusicSegment_Release
(
segment
);
...
...
@@ -1366,7 +1377,8 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface,
if
(
FAILED
(
hr
=
segment_state_play
(
state
,
iface
)))
{
ERR
(
"Failed to play segment state, hr %#lx
\n
"
,
hr
);
performance_set_primary_segment
(
This
,
NULL
);
if
(
primary
)
performance_set_primary_segment
(
This
,
NULL
);
if
(
control
)
performance_set_control_segment
(
This
,
NULL
);
}
else
if
(
segment_state
)
{
...
...
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