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
10a1e533
Commit
10a1e533
authored
Oct 12, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmband: Download segment tracks if performance auto-download is set.
parent
41062177
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
bandtrack.c
dlls/dmband/bandtrack.c
+2
-2
dmime_private.h
dlls/dmime/dmime_private.h
+1
-1
performance.c
dlls/dmime/performance.c
+1
-1
segmentstate.c
dlls/dmime/segmentstate.c
+14
-3
No files found.
dlls/dmband/bandtrack.c
View file @
10a1e533
...
...
@@ -234,7 +234,7 @@ static HRESULT WINAPI band_track_SetParam(IDirectMusicTrack8 *iface, REFGUID typ
band_connect_to_collection
(
entry
->
band
,
param
);
}
else
if
(
IsEqualGUID
(
type
,
&
GUID_Disable_Auto_Download
))
FIXME
(
"GUID_Disable_Auto_Download not handled yet
\n
"
)
;
This
->
header
.
bAutoDownload
=
FALSE
;
else
if
(
IsEqualGUID
(
type
,
&
GUID_Download
))
FIXME
(
"GUID_Download not handled yet
\n
"
);
else
if
(
IsEqualGUID
(
type
,
&
GUID_DownloadToAudioPath
))
...
...
@@ -265,7 +265,7 @@ static HRESULT WINAPI band_track_SetParam(IDirectMusicTrack8 *iface, REFGUID typ
IDirectMusicPerformance_Release
(
performance
);
}
else
if
(
IsEqualGUID
(
type
,
&
GUID_Enable_Auto_Download
))
FIXME
(
"GUID_Enable_Auto_Download not handled yet
\n
"
)
;
This
->
header
.
bAutoDownload
=
TRUE
;
else
if
(
IsEqualGUID
(
type
,
&
GUID_IDirectMusicBand
))
FIXME
(
"GUID_IDirectMusicBand not handled yet
\n
"
);
else
if
(
IsEqualGUID
(
type
,
&
GUID_StandardMIDIFile
))
...
...
dlls/dmime/dmime_private.h
View file @
10a1e533
...
...
@@ -75,7 +75,7 @@ extern void set_audiopath_primary_dsound_buffer(IDirectMusicAudioPath*,IDirectSo
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
);
extern
HRESULT
segment_state_end_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
*
performance
);
extern
HRESULT
wave_track_create_from_chunk
(
IStream
*
stream
,
struct
chunk_entry
*
parent
,
IDirectMusicTrack8
**
ret_iface
);
...
...
dlls/dmime/performance.c
View file @
10a1e533
...
...
@@ -1740,7 +1740,7 @@ 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
)))
if
(
FAILED
(
hr
=
segment_state_end_play
((
IDirectMusicSegmentState
*
)
notif
->
punkUser
,
performance
)))
WARN
(
"Failed to end segment state %p, hr %#lx
\n
"
,
notif
->
punkUser
,
hr
);
}
...
...
dlls/dmime/segmentstate.c
View file @
10a1e533
...
...
@@ -51,6 +51,7 @@ struct segment_state
MUSIC_TIME
start_time
;
MUSIC_TIME
start_point
;
MUSIC_TIME
end_point
;
BOOL
auto_download
;
struct
list
tracks
;
};
...
...
@@ -103,7 +104,7 @@ static ULONG WINAPI segment_state_Release(IDirectMusicSegmentState8 *iface)
if
(
!
ref
)
{
segment_state_end_play
((
IDirectMusicSegmentState
*
)
iface
);
segment_state_end_play
((
IDirectMusicSegmentState
*
)
iface
,
NULL
);
if
(
This
->
segment
)
IDirectMusicSegment_Release
(
This
->
segment
);
free
(
This
);
}
...
...
@@ -224,8 +225,13 @@ 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
,
&
This
->
auto_download
,
sizeof
(
This
->
auto_download
)))
&&
This
->
auto_download
)
hr
=
IDirectMusicSegment_SetParam
(
segment
,
&
GUID_DownloadToAudioPath
,
-
1
,
DMUS_SEG_ALLTRACKS
,
0
,
performance
);
This
->
start_time
=
start_time
;
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
);
for
(
i
=
0
;
SUCCEEDED
(
hr
);
i
++
)
...
...
@@ -283,10 +289,11 @@ HRESULT segment_state_play(IDirectMusicSegmentState *iface, IDirectMusicPerforma
return
hr
;
}
HRESULT
segment_state_end_play
(
IDirectMusicSegmentState
*
iface
)
HRESULT
segment_state_end_play
(
IDirectMusicSegmentState
*
iface
,
IDirectMusicPerformance
*
performance
)
{
struct
segment_state
*
This
=
impl_from_IDirectMusicSegmentState8
((
IDirectMusicSegmentState8
*
)
iface
);
struct
track_entry
*
entry
,
*
next
;
HRESULT
hr
;
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
next
,
&
This
->
tracks
,
struct
track_entry
,
entry
)
{
...
...
@@ -294,5 +301,9 @@ HRESULT segment_state_end_play(IDirectMusicSegmentState *iface)
track_entry_destroy
(
entry
);
}
if
(
performance
&&
This
->
auto_download
&&
FAILED
(
hr
=
IDirectMusicSegment_SetParam
(
This
->
segment
,
&
GUID_UnloadFromAudioPath
,
-
1
,
DMUS_SEG_ALLTRACKS
,
0
,
performance
)))
ERR
(
"Failed to unload segment from performance, hr %#lx
\n
"
,
hr
);
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