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
51942db8
Commit
51942db8
authored
Apr 26, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Apr 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Handle GUID_NULL when creating IDirectMusicBuffer.
parent
0a588385
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
buffer.c
dlls/dmusic/buffer.c
+6
-1
dmusic.c
dlls/dmusic/tests/dmusic.c
+1
-1
No files found.
dlls/dmusic/buffer.c
View file @
51942db8
...
...
@@ -18,6 +18,8 @@
*/
#include "dmusic_private.h"
#include "initguid.h"
#include "dmksctrl.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmusic
);
...
...
@@ -242,7 +244,10 @@ HRESULT DMUSIC_CreateDirectMusicBufferImpl(LPDMUS_BUFFERDESC desc, LPVOID* ret_i
dmbuffer
->
IDirectMusicBuffer_iface
.
lpVtbl
=
&
DirectMusicBuffer_Vtbl
;
dmbuffer
->
ref
=
0
;
/* Will be inited by QueryInterface */
memcpy
(
&
dmbuffer
->
format
,
&
desc
->
guidBufferFormat
,
sizeof
(
GUID
));
if
(
IsEqualGUID
(
&
desc
->
guidBufferFormat
,
&
GUID_NULL
))
dmbuffer
->
format
=
KSDATAFORMAT_SUBTYPE_MIDI
;
else
dmbuffer
->
format
=
desc
->
guidBufferFormat
;
dmbuffer
->
size
=
(
desc
->
cbBuffer
+
3
)
&
~
3
;
/* Buffer size must be multiple of 4 bytes */
dmbuffer
->
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dmbuffer
->
size
);
...
...
dlls/dmusic/tests/dmusic.c
View file @
51942db8
...
...
@@ -130,7 +130,7 @@ static void test_dmbuffer(void)
hr
=
IDirectMusicBuffer_GetBufferFormat
(
dmbuffer
,
&
format
);
ok
(
hr
==
S_OK
,
"IDirectMusicBuffer_GetBufferFormat returned %x
\n
"
,
hr
);
todo_wine
ok
(
IsEqualGUID
(
&
format
,
&
KSDATAFORMAT_SUBTYPE_MIDI
),
"Wrong format returned %s
\n
"
,
debugstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
KSDATAFORMAT_SUBTYPE_MIDI
),
"Wrong format returned %s
\n
"
,
debugstr_guid
(
&
format
));
hr
=
IDirectMusicBuffer_GetMaxBytes
(
dmbuffer
,
&
size
);
ok
(
hr
==
S_OK
,
"IDirectMusicBuffer_GetMaxBytes returned %x
\n
"
,
hr
);
ok
(
size
==
1024
,
"Buffer size is %u instead of 1024
\n
"
,
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