Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
32924d4e
Commit
32924d4e
authored
Jun 25, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Cleanup IDirectMusicSynth8 creation helper.
parent
ca097348
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
27 deletions
+33
-27
synth.c
dlls/dmsynth/synth.c
+33
-27
No files found.
dlls/dmsynth/synth.c
View file @
32924d4e
...
...
@@ -575,31 +575,37 @@ static const IKsControlVtbl DMSynthImpl_IKsControl_Vtbl = {
};
/* for ClassFactory */
HRESULT
WINAPI
DMUSIC_CreateDirectMusicSynthImpl
(
LPCGUID
lpcGUID
,
LPVOID
*
ppobj
,
LPUNKNOWN
pUnkOuter
)
{
IDirectMusicSynth8Impl
*
obj
;
TRACE
(
"(%p,%p,%p)
\n
"
,
lpcGUID
,
ppobj
,
pUnkOuter
);
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectMusicSynth8Impl
));
if
(
NULL
==
obj
)
{
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
obj
->
IDirectMusicSynth8_iface
.
lpVtbl
=
&
DirectMusicSynth8_Vtbl
;
obj
->
IKsControl_iface
.
lpVtbl
=
&
DMSynthImpl_IKsControl_Vtbl
;
obj
->
ref
=
0
;
/* fill in caps */
obj
->
pCaps
.
dwSize
=
sizeof
(
DMUS_PORTCAPS
);
obj
->
pCaps
.
dwFlags
=
DMUS_PC_DLS
|
DMUS_PC_SOFTWARESYNTH
|
DMUS_PC_DIRECTSOUND
|
DMUS_PC_DLS2
|
DMUS_PC_AUDIOPATH
|
DMUS_PC_WAVE
;
obj
->
pCaps
.
guidPort
=
CLSID_DirectMusicSynth
;
obj
->
pCaps
.
dwClass
=
DMUS_PC_OUTPUTCLASS
;
obj
->
pCaps
.
dwType
=
DMUS_PORT_USER_MODE_SYNTH
;
obj
->
pCaps
.
dwMemorySize
=
DMUS_PC_SYSTEMMEMORY
;
obj
->
pCaps
.
dwMaxChannelGroups
=
1000
;
obj
->
pCaps
.
dwMaxVoices
=
1000
;
obj
->
pCaps
.
dwMaxAudioChannels
=
2
;
obj
->
pCaps
.
dwEffectFlags
=
DMUS_EFFECT_REVERB
;
MultiByteToWideChar
(
CP_ACP
,
0
,
"Microsoft Synthesizer"
,
-
1
,
obj
->
pCaps
.
wszDescription
,
sizeof
(
obj
->
pCaps
.
wszDescription
)
/
sizeof
(
WCHAR
));
return
IDirectMusicSynth8Impl_QueryInterface
((
LPDIRECTMUSICSYNTH8
)
obj
,
lpcGUID
,
ppobj
);
HRESULT
WINAPI
DMUSIC_CreateDirectMusicSynthImpl
(
REFIID
riid
,
void
**
ppobj
,
IUnknown
*
outer
)
{
static
const
WCHAR
descrW
[]
=
{
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
' '
,
'S'
,
'y'
,
'n'
,
't'
,
'h'
,
'e'
,
's'
,
'i'
,
'z'
,
'e'
,
'r'
,
0
};
IDirectMusicSynth8Impl
*
obj
;
HRESULT
hr
;
TRACE
(
"(%s, %p, %p)
\n
"
,
debugstr_guid
(
riid
),
ppobj
,
outer
);
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
obj
));
if
(
NULL
==
obj
)
{
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
obj
->
IDirectMusicSynth8_iface
.
lpVtbl
=
&
DirectMusicSynth8_Vtbl
;
obj
->
IKsControl_iface
.
lpVtbl
=
&
DMSynthImpl_IKsControl_Vtbl
;
obj
->
ref
=
1
;
/* fill in caps */
obj
->
pCaps
.
dwSize
=
sizeof
(
DMUS_PORTCAPS
);
obj
->
pCaps
.
dwFlags
=
DMUS_PC_DLS
|
DMUS_PC_SOFTWARESYNTH
|
DMUS_PC_DIRECTSOUND
|
DMUS_PC_DLS2
|
DMUS_PC_AUDIOPATH
|
DMUS_PC_WAVE
;
obj
->
pCaps
.
guidPort
=
CLSID_DirectMusicSynth
;
obj
->
pCaps
.
dwClass
=
DMUS_PC_OUTPUTCLASS
;
obj
->
pCaps
.
dwType
=
DMUS_PORT_USER_MODE_SYNTH
;
obj
->
pCaps
.
dwMemorySize
=
DMUS_PC_SYSTEMMEMORY
;
obj
->
pCaps
.
dwMaxChannelGroups
=
1000
;
obj
->
pCaps
.
dwMaxVoices
=
1000
;
obj
->
pCaps
.
dwMaxAudioChannels
=
2
;
obj
->
pCaps
.
dwEffectFlags
=
DMUS_EFFECT_REVERB
;
strcpyW
(
obj
->
pCaps
.
wszDescription
,
descrW
);
hr
=
IDirectMusicSynth8_QueryInterface
(
&
obj
->
IDirectMusicSynth8_iface
,
riid
,
ppobj
);
IDirectMusicSynth8_Release
(
&
obj
->
IDirectMusicSynth8_iface
);
return
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