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
c227e8bb
Commit
c227e8bb
authored
Oct 24, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Pass IDirectMusicPerformance8 to segment state functions.
parent
8d6cd1b5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
dmime_private.h
dlls/dmime/dmime_private.h
+3
-3
performance.c
dlls/dmime/performance.c
+4
-3
segmentstate.c
dlls/dmime/segmentstate.c
+6
-6
No files found.
dlls/dmime/dmime_private.h
View file @
c227e8bb
...
...
@@ -73,9 +73,9 @@ extern void set_audiopath_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffe
extern
void
set_audiopath_primary_dsound_buffer
(
IDirectMusicAudioPath
*
,
IDirectSoundBuffer
*
);
extern
HRESULT
segment_state_create
(
IDirectMusicSegment
*
segment
,
MUSIC_TIME
start_time
,
IDirectMusicPerformance
*
performance
,
IDirectMusicSegmentState
**
ret_iface
);
extern
HRESULT
segment_state_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
*
performance
);
extern
HRESULT
segment_state_end_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
*
performance
);
IDirectMusicPerformance
8
*
performance
,
IDirectMusicSegmentState
**
ret_iface
);
extern
HRESULT
segment_state_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
8
*
performance
);
extern
HRESULT
segment_state_end_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
8
*
performance
);
extern
HRESULT
wave_track_create_from_chunk
(
IStream
*
stream
,
struct
chunk_entry
*
parent
,
IDirectMusicTrack8
**
ret_iface
);
...
...
dlls/dmime/performance.c
View file @
c227e8bb
...
...
@@ -1196,7 +1196,7 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface,
if
(
FAILED
(
hr
=
IUnknown_QueryInterface
(
source
,
&
IID_IDirectMusicSegment
,
(
void
**
)
&
segment
)))
return
hr
;
if
(
FAILED
(
hr
=
segment_state_create
(
segment
,
start_time
,
(
IDirectMusicPerformance
*
)
iface
,
&
state
)))
if
(
FAILED
(
hr
=
segment_state_create
(
segment
,
start_time
,
iface
,
&
state
)))
{
IDirectMusicSegment_Release
(
segment
);
return
hr
;
...
...
@@ -1213,7 +1213,7 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface,
hr
=
performance_send_dirty_pmsg
(
This
,
start_time
);
if
(
SUCCEEDED
(
hr
))
hr
=
segment_state_play
(
state
,
(
IDirectMusicPerformance
*
)
iface
);
hr
=
segment_state_play
(
state
,
iface
);
if
(
SUCCEEDED
(
hr
))
hr
=
performance_send_notification_pmsg
(
This
,
start_time
+
length
,
This
->
notification_segment
,
...
...
@@ -1767,7 +1767,8 @@ static HRESULT WINAPI performance_tool_ProcessPMsg(IDirectMusicTool *iface,
if
(
IsEqualGUID
(
&
notif
->
guidNotificationType
,
&
GUID_NOTIFICATION_SEGMENT
)
&&
notif
->
dwNotificationOption
==
DMUS_NOTIFICATION_SEGEND
)
{
if
(
FAILED
(
hr
=
segment_state_end_play
((
IDirectMusicSegmentState
*
)
notif
->
punkUser
,
performance
)))
if
(
FAILED
(
hr
=
segment_state_end_play
((
IDirectMusicSegmentState
*
)
notif
->
punkUser
,
(
IDirectMusicPerformance8
*
)
performance
)))
WARN
(
"Failed to end segment state %p, hr %#lx
\n
"
,
notif
->
punkUser
,
hr
);
}
...
...
dlls/dmime/segmentstate.c
View file @
c227e8bb
...
...
@@ -209,7 +209,7 @@ HRESULT create_dmsegmentstate(REFIID riid, void **ret_iface)
}
HRESULT
segment_state_create
(
IDirectMusicSegment
*
segment
,
MUSIC_TIME
start_time
,
IDirectMusicPerformance
*
performance
,
IDirectMusicSegmentState
**
ret_iface
)
IDirectMusicPerformance
8
*
performance
,
IDirectMusicSegmentState
**
ret_iface
)
{
IDirectMusicSegmentState
*
iface
;
struct
segment_state
*
This
;
...
...
@@ -225,7 +225,7 @@ HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time
This
->
segment
=
segment
;
IDirectMusicSegment_AddRef
(
This
->
segment
);
if
(
SUCCEEDED
(
hr
=
IDirectMusicPerformance_GetGlobalParam
(
performance
,
&
GUID_PerfAutoDownload
,
if
(
SUCCEEDED
(
hr
=
IDirectMusicPerformance
8
_GetGlobalParam
(
performance
,
&
GUID_PerfAutoDownload
,
&
This
->
auto_download
,
sizeof
(
This
->
auto_download
)))
&&
This
->
auto_download
)
hr
=
IDirectMusicSegment_SetParam
(
segment
,
&
GUID_DownloadToAudioPath
,
-
1
,
DMUS_SEG_ALLTRACKS
,
0
,
performance
);
...
...
@@ -247,7 +247,7 @@ HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time
if
(
!
(
entry
=
malloc
(
sizeof
(
*
entry
))))
hr
=
E_OUTOFMEMORY
;
else
if
(
SUCCEEDED
(
hr
=
IDirectMusicTrack_InitPlay
(
track
,
iface
,
performance
,
else
if
(
SUCCEEDED
(
hr
=
IDirectMusicTrack_InitPlay
(
track
,
iface
,
(
IDirectMusicPerformance
*
)
performance
,
&
entry
->
state_data
,
track_id
,
0
)))
{
entry
->
track
=
track
;
...
...
@@ -268,7 +268,7 @@ HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time
return
hr
;
}
HRESULT
segment_state_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
*
performance
)
HRESULT
segment_state_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
8
*
performance
)
{
struct
segment_state
*
This
=
impl_from_IDirectMusicSegmentState8
((
IDirectMusicSegmentState8
*
)
iface
);
DWORD
track_flags
=
DMUS_TRACKF_DIRTY
|
DMUS_TRACKF_START
|
DMUS_TRACKF_SEEK
;
...
...
@@ -279,7 +279,7 @@ HRESULT segment_state_play(IDirectMusicSegmentState *iface, IDirectMusicPerforma
LIST_FOR_EACH_ENTRY
(
entry
,
&
This
->
tracks
,
struct
track_entry
,
entry
)
{
if
(
FAILED
(
hr
=
IDirectMusicTrack_Play
(
entry
->
track
,
entry
->
state_data
,
start_time
,
end_time
,
0
,
track_flags
,
performance
,
iface
,
entry
->
track_id
)))
end_time
,
0
,
track_flags
,
(
IDirectMusicPerformance
*
)
performance
,
iface
,
entry
->
track_id
)))
{
WARN
(
"Failed to play track %p, hr %#lx
\n
"
,
entry
->
track
,
hr
);
break
;
...
...
@@ -289,7 +289,7 @@ HRESULT segment_state_play(IDirectMusicSegmentState *iface, IDirectMusicPerforma
return
hr
;
}
HRESULT
segment_state_end_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
*
performance
)
HRESULT
segment_state_end_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
8
*
performance
)
{
struct
segment_state
*
This
=
impl_from_IDirectMusicSegmentState8
((
IDirectMusicSegmentState8
*
)
iface
);
struct
track_entry
*
entry
,
*
next
;
...
...
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