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
92985253
Commit
92985253
authored
Sep 21, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmband: Implement band track GUID_ConnectToDLSCollection parameter.
parent
8645d9eb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
14 deletions
+67
-14
band.c
dlls/dmband/band.c
+26
-0
bandtrack.c
dlls/dmband/bandtrack.c
+6
-1
dmband_private.h
dlls/dmband/dmband_private.h
+2
-0
dmobject.c
dlls/dmusic/dmobject.c
+30
-13
dmobject.h
dlls/dmusic/dmobject.h
+3
-0
No files found.
dlls/dmband/band.c
View file @
92985253
...
...
@@ -59,6 +59,7 @@ struct band
struct
dmobject
dmobj
;
LONG
ref
;
struct
list
instruments
;
IDirectMusicCollection
*
collection
;
};
static
inline
struct
band
*
impl_from_IDirectMusicBand
(
IDirectMusicBand
*
iface
)
...
...
@@ -117,6 +118,7 @@ static ULONG WINAPI band_Release(IDirectMusicBand *iface)
instrument_entry_destroy
(
entry
);
}
if
(
This
->
collection
)
IDirectMusicCollection_Release
(
This
->
collection
);
free
(
This
);
}
...
...
@@ -336,11 +338,23 @@ static inline struct band *impl_from_IPersistStream(IPersistStream *iface)
static
HRESULT
WINAPI
band_persist_stream_Load
(
IPersistStream
*
iface
,
IStream
*
stream
)
{
struct
band
*
This
=
impl_from_IPersistStream
(
iface
);
DMUS_OBJECTDESC
default_desc
=
{
.
dwSize
=
sizeof
(
DMUS_OBJECTDESC
),
.
dwValidData
=
DMUS_OBJ_OBJECT
|
DMUS_OBJ_CLASS
,
.
guidClass
=
CLSID_DirectMusicCollection
,
.
guidObject
=
GUID_DefaultGMCollection
,
};
struct
chunk_entry
chunk
=
{
0
};
HRESULT
hr
;
TRACE
(
"%p, %p
\n
"
,
iface
,
stream
);
if
(
This
->
collection
)
IDirectMusicCollection_Release
(
This
->
collection
);
if
(
FAILED
(
hr
=
stream_get_object
(
stream
,
&
default_desc
,
&
IID_IDirectMusicCollection
,
(
void
**
)
&
This
->
collection
)))
WARN
(
"Failed to load default collection from loader, hr %#lx
\n
"
,
hr
);
if
((
hr
=
stream_get_chunk
(
stream
,
&
chunk
))
==
S_OK
)
{
switch
(
MAKE_IDTYPE
(
chunk
.
id
,
chunk
.
type
))
...
...
@@ -408,3 +422,15 @@ HRESULT create_dmband(REFIID lpcGUID, void **ppobj)
return
hr
;
}
HRESULT
band_connect_to_collection
(
IDirectMusicBand
*
iface
,
IDirectMusicCollection
*
collection
)
{
struct
band
*
This
=
impl_from_IDirectMusicBand
(
iface
);
TRACE
(
"%p, %p
\n
"
,
iface
,
collection
);
if
(
This
->
collection
)
IDirectMusicCollection_Release
(
This
->
collection
);
if
((
This
->
collection
=
collection
))
IDirectMusicCollection_AddRef
(
This
->
collection
);
return
S_OK
;
}
dlls/dmband/bandtrack.c
View file @
92985253
...
...
@@ -182,7 +182,12 @@ static HRESULT WINAPI band_track_SetParam(IDirectMusicTrack8 *iface, REFGUID typ
else
if
(
IsEqualGUID
(
type
,
&
GUID_Clear_All_Bands
))
FIXME
(
"GUID_Clear_All_Bands not handled yet
\n
"
);
else
if
(
IsEqualGUID
(
type
,
&
GUID_ConnectToDLSCollection
))
FIXME
(
"GUID_ConnectToDLSCollection not handled yet
\n
"
);
{
struct
band_entry
*
entry
;
LIST_FOR_EACH_ENTRY
(
entry
,
&
This
->
bands
,
struct
band_entry
,
entry
)
band_connect_to_collection
(
entry
->
band
,
param
);
}
else
if
(
IsEqualGUID
(
type
,
&
GUID_Disable_Auto_Download
))
FIXME
(
"GUID_Disable_Auto_Download not handled yet
\n
"
);
else
if
(
IsEqualGUID
(
type
,
&
GUID_Download
))
...
...
dlls/dmband/dmband_private.h
View file @
92985253
...
...
@@ -47,4 +47,6 @@
extern
HRESULT
create_dmband
(
REFIID
riid
,
void
**
ret_iface
);
extern
HRESULT
create_dmbandtrack
(
REFIID
riid
,
void
**
ret_iface
);
extern
HRESULT
band_connect_to_collection
(
IDirectMusicBand
*
iface
,
IDirectMusicCollection
*
collection
);
#endif
/* __WINE_DMBAND_PRIVATE_H */
dlls/dmusic/dmobject.c
View file @
92985253
...
...
@@ -444,6 +444,35 @@ HRESULT stream_chunk_get_wstr(IStream *stream, const struct chunk_entry *chunk,
return
S_OK
;
}
HRESULT
stream_get_loader
(
IStream
*
stream
,
IDirectMusicLoader
**
ret_loader
)
{
IDirectMusicGetLoader
*
getter
;
HRESULT
hr
;
if
(
SUCCEEDED
(
hr
=
IStream_QueryInterface
(
stream
,
&
IID_IDirectMusicGetLoader
,
(
void
**
)
&
getter
)))
{
hr
=
IDirectMusicGetLoader_GetLoader
(
getter
,
ret_loader
);
IDirectMusicGetLoader_Release
(
getter
);
}
if
(
FAILED
(
hr
))
*
ret_loader
=
NULL
;
return
hr
;
}
HRESULT
stream_get_object
(
IStream
*
stream
,
DMUS_OBJECTDESC
*
desc
,
REFIID
iid
,
void
**
ret_iface
)
{
IDirectMusicLoader
*
loader
;
HRESULT
hr
;
if
(
SUCCEEDED
(
hr
=
stream_get_loader
(
stream
,
&
loader
)))
{
hr
=
IDirectMusicLoader_GetObject
(
loader
,
desc
,
iid
,
(
void
**
)
ret_iface
);
IDirectMusicLoader_Release
(
loader
);
}
if
(
FAILED
(
hr
))
*
ret_iface
=
NULL
;
return
hr
;
}
/* Generic IDirectMusicObject methods */
...
...
@@ -626,8 +655,6 @@ HRESULT dmobj_parsereference(IStream *stream, const struct chunk_entry *list,
IDirectMusicObject
**
dmobj
)
{
struct
chunk_entry
chunk
=
{.
parent
=
list
};
IDirectMusicGetLoader
*
getloader
;
IDirectMusicLoader
*
loader
;
DMUS_OBJECTDESC
desc
;
DMUS_IO_REFERENCE
reference
;
HRESULT
hr
;
...
...
@@ -650,17 +677,7 @@ HRESULT dmobj_parsereference(IStream *stream, const struct chunk_entry *list,
desc
.
dwValidData
|=
DMUS_OBJ_CLASS
;
dump_DMUS_OBJECTDESC
(
&
desc
);
if
(
FAILED
(
hr
=
IStream_QueryInterface
(
stream
,
&
IID_IDirectMusicGetLoader
,
(
void
**
)
&
getloader
)))
return
hr
;
hr
=
IDirectMusicGetLoader_GetLoader
(
getloader
,
&
loader
);
IDirectMusicGetLoader_Release
(
getloader
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IDirectMusicLoader_GetObject
(
loader
,
&
desc
,
&
IID_IDirectMusicObject
,
(
void
**
)
dmobj
);
IDirectMusicLoader_Release
(
loader
);
return
hr
;
return
stream_get_object
(
stream
,
&
desc
,
&
IID_IDirectMusicObject
,
(
void
**
)
dmobj
);
}
/* Generic IPersistStream methods */
...
...
dlls/dmusic/dmobject.h
View file @
92985253
...
...
@@ -44,6 +44,9 @@ HRESULT stream_chunk_get_data(IStream *stream, const struct chunk_entry *chunk,
HRESULT
stream_chunk_get_wstr
(
IStream
*
stream
,
const
struct
chunk_entry
*
chunk
,
WCHAR
*
str
,
ULONG
size
);
HRESULT
stream_get_loader
(
IStream
*
stream
,
IDirectMusicLoader
**
ret_loader
);
HRESULT
stream_get_object
(
IStream
*
stream
,
DMUS_OBJECTDESC
*
desc
,
REFIID
riid
,
void
**
ret_iface
);
static
inline
HRESULT
stream_reset_chunk_data
(
IStream
*
stream
,
const
struct
chunk_entry
*
chunk
)
{
LARGE_INTEGER
offset
;
...
...
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