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
ac25d099
Commit
ac25d099
authored
Sep 04, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Simplify and cleanup IDirectMusicDownload constructor.
parent
abc6ecc8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
12 deletions
+8
-12
dmusic_private.h
dlls/dmusic/dmusic_private.h
+2
-1
download.c
dlls/dmusic/download.c
+5
-10
port.c
dlls/dmusic/port.c
+1
-1
No files found.
dlls/dmusic/dmusic_private.h
View file @
ac25d099
...
...
@@ -97,10 +97,11 @@ extern HRESULT DMUSIC_CreateDirectMusicCollectionImpl(REFIID riid, void **ppobj,
/* Internal */
extern
HRESULT
DMUSIC_CreateDirectMusicBufferImpl
(
LPDMUS_BUFFERDESC
desc
,
LPVOID
*
ret_iface
);
extern
HRESULT
DMUSIC_CreateDirectMusicDownloadImpl
(
LPCGUID
lpcGUID
,
LPVOID
*
ppobj
,
LPUNKNOWN
pUnkOuter
);
extern
HRESULT
DMUSIC_CreateReferenceClockImpl
(
LPCGUID
lpcGUID
,
LPVOID
*
ppobj
,
LPUNKNOWN
pUnkOuter
);
extern
HRESULT
DMUSIC_CreateDirectMusicInstrumentImpl
(
LPCGUID
lpcGUID
,
LPVOID
*
ppobj
,
LPUNKNOWN
pUnkOuter
);
extern
HRESULT
download_create
(
IDirectMusicDownload
**
ret_iface
);
/*****************************************************************************
* IDirectMusic8Impl implementation structure
*/
...
...
dlls/dmusic/download.c
View file @
ac25d099
...
...
@@ -85,21 +85,16 @@ static const IDirectMusicDownloadVtbl DirectMusicDownload_Vtbl = {
IDirectMusicDownloadImpl_GetBuffer
};
/* for ClassFactory */
HRESULT
DMUSIC_CreateDirectMusicDownloadImpl
(
const
GUID
*
guid
,
void
**
ret_iface
,
IUnknown
*
unk_outer
)
HRESULT
download_create
(
IDirectMusicDownload
**
ret_iface
)
{
IDirectMusicDownloadImpl
*
download
;
download
=
malloc
(
sizeof
(
*
download
));
if
(
!
download
)
{
*
ret_iface
=
NULL
;
return
E_OUTOFMEMORY
;
}
*
ret_iface
=
NULL
;
if
(
!
(
download
=
calloc
(
1
,
sizeof
(
*
download
))))
return
E_OUTOFMEMORY
;
download
->
IDirectMusicDownload_iface
.
lpVtbl
=
&
DirectMusicDownload_Vtbl
;
download
->
ref
=
1
;
*
ret_iface
=
download
;
TRACE
(
"Created DirectMusicDownload %p
\n
"
,
download
);
*
ret_iface
=
&
download
->
IDirectMusicDownload_iface
;
return
S_OK
;
}
dlls/dmusic/port.c
View file @
ac25d099
...
...
@@ -582,7 +582,7 @@ static HRESULT WINAPI synth_port_download_GetBuffer(IDirectMusicPortDownload *if
if
(
!
IDMDownload
)
return
E_POINTER
;
return
DMUSIC_CreateDirectMusicDownloadImpl
(
&
IID_IDirectMusicDownload
,
(
LPVOID
*
)
IDMDownload
,
NULL
);
return
download_create
(
IDMDownload
);
}
static
HRESULT
WINAPI
synth_port_download_AllocateBuffer
(
IDirectMusicPortDownload
*
iface
,
DWORD
size
,
...
...
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