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
d3b19150
Commit
d3b19150
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: Implement IDirectMusicPortDownload_GetBuffer.
parent
73d1e066
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
port.c
dlls/dmusic/port.c
+17
-6
dmusic.c
dlls/dmusic/tests/dmusic.c
+7
-7
No files found.
dlls/dmusic/port.c
View file @
d3b19150
...
...
@@ -592,17 +592,28 @@ static ULONG WINAPI synth_port_download_Release(IDirectMusicPortDownload *iface)
return
IDirectMusicPort_Release
(
&
This
->
IDirectMusicPort_iface
);
}
static
HRESULT
WINAPI
synth_port_download_GetBuffer
(
IDirectMusicPortDownload
*
iface
,
DWORD
DLI
d
,
IDirectMusicDownload
**
IDMD
ownload
)
static
HRESULT
WINAPI
synth_port_download_GetBuffer
(
IDirectMusicPortDownload
*
iface
,
DWORD
i
d
,
IDirectMusicDownload
**
d
ownload
)
{
struct
synth_port
*
This
=
synth_from_IDirectMusicPortDownload
(
iface
);
struct
download_entry
*
entry
;
FIXME
(
"(%p/%p, %lu, %p): stub
\n
"
,
iface
,
This
,
DLId
,
IDMD
ownload
);
TRACE
(
"(%p/%p, %lu, %p)
\n
"
,
iface
,
This
,
id
,
d
ownload
);
if
(
!
IDMDownload
)
return
E_POINTER
;
if
(
!
download
)
return
E_POINTER
;
if
(
id
>=
This
->
next_dlid
)
return
DMUS_E_INVALID_DOWNLOADID
;
LIST_FOR_EACH_ENTRY
(
entry
,
&
This
->
downloads
,
struct
download_entry
,
entry
)
{
if
(
entry
->
id
==
id
)
{
*
download
=
entry
->
download
;
IDirectMusicDownload_AddRef
(
entry
->
download
);
return
S_OK
;
}
}
return
download_create
(
0
,
IDMDownload
)
;
return
DMUS_E_NOT_DOWNLOADED_TO_PORT
;
}
static
HRESULT
WINAPI
synth_port_download_AllocateBuffer
(
IDirectMusicPortDownload
*
iface
,
DWORD
size
,
...
...
dlls/dmusic/tests/dmusic.c
View file @
d3b19150
...
...
@@ -1059,9 +1059,9 @@ static void test_port_download(void)
hr
=
IDirectMusicPortDownload_GetBuffer
(
port
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicPortDownload_GetBuffer
(
port
,
0
,
&
download
);
todo_wine
ok
(
hr
==
DMUS_E_INVALID_DOWNLOADID
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_INVALID_DOWNLOADID
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicPortDownload_GetBuffer
(
port
,
0xdeadbeef
,
&
download
);
todo_wine
ok
(
hr
==
DMUS_E_INVALID_DOWNLOADID
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_INVALID_DOWNLOADID
,
"got %#lx
\n
"
,
hr
);
/* AllocateBuffer use the exact requested size */
hr
=
IDirectMusicPortDownload_AllocateBuffer
(
port
,
0
,
NULL
);
...
...
@@ -1093,7 +1093,7 @@ static void test_port_download(void)
/* GetBuffer looks up allocated ids to find downloaded buffers */
hr
=
IDirectMusicPortDownload_GetBuffer
(
port
,
2
,
&
download
);
todo_wine
ok
(
hr
==
DMUS_E_NOT_DOWNLOADED_TO_PORT
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_NOT_DOWNLOADED_TO_PORT
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicPortDownload_GetAppend
(
port
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got %#lx
\n
"
,
hr
);
...
...
@@ -1119,7 +1119,7 @@ static void test_port_download(void)
wave_download
->
info
.
dwDLType
=
0
;
wave_download
->
info
.
dwNumOffsetTableEntries
=
0
;
hr
=
IDirectMusicPortDownload_GetBuffer
(
port
,
2
,
&
tmp_download
);
todo_wine
ok
(
hr
==
DMUS_E_NOT_DOWNLOADED_TO_PORT
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_NOT_DOWNLOADED_TO_PORT
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicPortDownload_Download
(
port
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#lx
\n
"
,
hr
);
...
...
@@ -1150,8 +1150,8 @@ static void test_port_download(void)
tmp_download
=
invalid_ptr
;
hr
=
IDirectMusicPortDownload_GetBuffer
(
port
,
2
,
&
tmp_download
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
todo_wine
ok
(
tmp_download
==
download
,
"got %p
\n
"
,
tmp_download
);
if
(
tmp_download
!=
invalid_ptr
)
IDirectMusicDownload_Release
(
tmp_download
);
ok
(
tmp_download
==
download
,
"got %p
\n
"
,
tmp_download
);
IDirectMusicDownload_Release
(
tmp_download
);
hr
=
IDirectMusicPortDownload_Unload
(
port
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#lx
\n
"
,
hr
);
...
...
@@ -1159,7 +1159,7 @@ static void test_port_download(void)
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicPortDownload_GetBuffer
(
port
,
2
,
&
tmp_download
);
todo_wine
ok
(
hr
==
DMUS_E_NOT_DOWNLOADED_TO_PORT
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_NOT_DOWNLOADED_TO_PORT
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicPortDownload_Unload
(
port
,
download
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
...
...
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