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
b0573f9d
Commit
b0573f9d
authored
Sep 10, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmband: Download / unload bands when initializing / ending band track.
parent
d177709b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
7 deletions
+34
-7
bandtrack.c
dlls/dmband/bandtrack.c
+34
-5
dmband.c
dlls/dmband/tests/dmband.c
+0
-2
No files found.
dlls/dmband/bandtrack.c
View file @
b0573f9d
...
...
@@ -104,10 +104,13 @@ static ULONG WINAPI band_track_Release(IDirectMusicTrack8 *iface)
return
ref
;
}
static
HRESULT
WINAPI
band_track_Init
(
IDirectMusicTrack8
*
iface
,
IDirectMusicSegment
*
pS
egment
)
static
HRESULT
WINAPI
band_track_Init
(
IDirectMusicTrack8
*
iface
,
IDirectMusicSegment
*
s
egment
)
{
struct
band_track
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pSegment
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
segment
);
if
(
!
segment
)
return
E_POINTER
;
return
S_OK
;
}
...
...
@@ -116,16 +119,42 @@ static HRESULT WINAPI band_track_InitPlay(IDirectMusicTrack8 *iface,
void
**
state_data
,
DWORD
virtual_track8id
,
DWORD
flags
)
{
struct
band_track
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
struct
band_entry
*
entry
;
HRESULT
hr
;
FIXME
(
"(%p, %p, %p, %p, %ld, %lx): semi-stub
\n
"
,
This
,
segment_state
,
performance
,
state_data
,
virtual_track8id
,
flags
);
if
(
!
performance
)
return
E_POINTER
;
FIXME
(
"(%p, %p, %p, %p, %ld, %lx): stub
\n
"
,
This
,
segment_state
,
performance
,
state_data
,
virtual_track8id
,
flags
);
if
(
This
->
header
.
bAutoDownload
)
{
LIST_FOR_EACH_ENTRY
(
entry
,
&
This
->
bands
,
struct
band_entry
,
entry
)
{
if
(
FAILED
(
hr
=
IDirectMusicBand_Download
(
entry
->
band
,
performance
)))
return
hr
;
}
}
return
S_OK
;
}
static
HRESULT
WINAPI
band_track_EndPlay
(
IDirectMusicTrack8
*
iface
,
void
*
pStateD
ata
)
static
HRESULT
WINAPI
band_track_EndPlay
(
IDirectMusicTrack8
*
iface
,
void
*
state_d
ata
)
{
struct
band_track
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pStateData
);
struct
band_entry
*
entry
;
HRESULT
hr
;
FIXME
(
"(%p, %p): semi-stub
\n
"
,
This
,
state_data
);
if
(
This
->
header
.
bAutoDownload
)
{
LIST_FOR_EACH_ENTRY
(
entry
,
&
This
->
bands
,
struct
band_entry
,
entry
)
{
if
(
FAILED
(
hr
=
IDirectMusicBand_Unload
(
entry
->
band
,
NULL
)))
return
hr
;
}
}
return
S_OK
;
}
...
...
dlls/dmband/tests/dmband.c
View file @
b0573f9d
...
...
@@ -226,12 +226,10 @@ static void test_bandtrack(void)
ok
(
hr
==
S_OK
,
"DirectMusicBandTrack create failed: %#lx, expected S_OK
\n
"
,
hr
);
/* IDirectMusicTrack8 */
todo_wine
{
hr
=
IDirectMusicTrack8_Init
(
dmt8
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IDirectMusicTrack8_Init failed: %#lx
\n
"
,
hr
);
hr
=
IDirectMusicTrack8_InitPlay
(
dmt8
,
NULL
,
NULL
,
NULL
,
0
,
0
);
ok
(
hr
==
E_POINTER
,
"IDirectMusicTrack8_InitPlay failed: %#lx
\n
"
,
hr
);
}
hr
=
IDirectMusicTrack8_EndPlay
(
dmt8
,
NULL
);
ok
(
hr
==
S_OK
,
"IDirectMusicTrack8_EndPlay failed: %#lx
\n
"
,
hr
);
hr
=
IDirectMusicTrack8_Play
(
dmt8
,
NULL
,
0
,
0
,
0
,
0
,
NULL
,
NULL
,
0
);
...
...
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