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
478191c0
Commit
478191c0
authored
Jul 19, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Cleanup IDirectSoundImpl_Create() and move it.
parent
a565c0fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
26 deletions
+21
-26
dsound.c
dlls/dsound/dsound.c
+21
-26
No files found.
dlls/dsound/dsound.c
View file @
478191c0
...
...
@@ -85,8 +85,6 @@ struct IDirectSoundImpl
LPDIRECTSOUND8
pDS8
;
};
static
HRESULT
IDirectSoundImpl_Create
(
IDirectSound8
**
ppds
,
BOOL
has_ds8
);
static
ULONG
WINAPI
IDirectSound_IUnknown_AddRef
(
LPUNKNOWN
iface
);
static
ULONG
WINAPI
IDirectSound_IDirectSound_AddRef
(
LPDIRECTSOUND
iface
);
...
...
@@ -224,28 +222,6 @@ static void directsound_destroy(IDirectSoundImpl *This)
TRACE
(
"(%p) released
\n
"
,
This
);
}
static
HRESULT
IDirectSoundImpl_Create
(
IDirectSound8
**
ppDS
,
BOOL
has_ds8
)
{
IDirectSoundImpl
*
pDS
;
TRACE
(
"(%p)
\n
"
,
ppDS
);
/* Allocate memory */
pDS
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectSoundImpl
));
if
(
pDS
==
NULL
)
{
WARN
(
"out of memory
\n
"
);
*
ppDS
=
NULL
;
return
DSERR_OUTOFMEMORY
;
}
pDS
->
numIfaces
=
0
;
pDS
->
device
=
NULL
;
pDS
->
has_ds8
=
has_ds8
;
*
ppDS
=
(
LPDIRECTSOUND8
)
pDS
;
return
DS_OK
;
}
/*******************************************************************************
* IDirectSound_IUnknown
*/
...
...
@@ -659,6 +635,25 @@ static HRESULT IDirectSound8_IDirectSound8_Create(
return
DS_OK
;
}
static
HRESULT
IDirectSoundImpl_Create
(
void
**
ppv
,
BOOL
has_ds8
)
{
IDirectSoundImpl
*
obj
;
*
ppv
=
NULL
;
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
obj
));
if
(
!
obj
)
{
WARN
(
"out of memory
\n
"
);
return
DSERR_OUTOFMEMORY
;
}
obj
->
numIfaces
=
0
;
obj
->
device
=
NULL
;
obj
->
has_ds8
=
has_ds8
;
*
ppv
=
obj
;
return
DS_OK
;
}
HRESULT
DSOUND_Create
(
REFIID
riid
,
LPDIRECTSOUND
*
ppDS
)
...
...
@@ -676,7 +671,7 @@ HRESULT DSOUND_Create(
/* Get dsound configuration */
setup_dsound_options
();
hr
=
IDirectSoundImpl_Create
(
&
pDS
,
FALSE
);
hr
=
IDirectSoundImpl_Create
(
(
void
**
)
&
pDS
,
FALSE
);
if
(
hr
==
DS_OK
)
{
hr
=
IDirectSound_IDirectSound_Create
(
pDS
,
ppDS
);
if
(
*
ppDS
)
...
...
@@ -764,7 +759,7 @@ HRESULT DSOUND_Create8(
/* Get dsound configuration */
setup_dsound_options
();
hr
=
IDirectSoundImpl_Create
(
&
pDS
,
TRUE
);
hr
=
IDirectSoundImpl_Create
(
(
void
**
)
&
pDS
,
TRUE
);
if
(
hr
==
DS_OK
)
{
hr
=
IDirectSound8_IDirectSound8_Create
(
pDS
,
ppDS
);
if
(
*
ppDS
)
...
...
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