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
bb72548f
Commit
bb72548f
authored
Dec 22, 2015
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Use a better name for IDirectSoundBufferImpl_Create().
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d51d55ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
24 deletions
+13
-24
buffer.c
dlls/dsound/buffer.c
+9
-15
dsound.c
dlls/dsound/dsound.c
+2
-5
dsound_private.h
dlls/dsound/dsound_private.h
+2
-4
No files found.
dlls/dsound/buffer.c
View file @
bb72548f
...
...
@@ -983,19 +983,15 @@ static const IDirectSoundBuffer8Vtbl dsbvt =
IDirectSoundBufferImpl_GetObjectInPath
};
HRESULT
IDirectSoundBufferImpl_Create
(
DirectSoundDevice
*
device
,
IDirectSoundBufferImpl
**
pdsb
,
LPCDSBUFFERDESC
dsbd
)
HRESULT
secondarybuffer_create
(
DirectSoundDevice
*
device
,
const
DSBUFFERDESC
*
dsbd
,
IDirectSoundBuffer
**
buffer
)
{
IDirectSoundBufferImpl
*
dsb
;
LPWAVEFORMATEX
wfex
=
dsbd
->
lpwfxFormat
;
HRESULT
err
=
DS_OK
;
DWORD
capf
=
0
;
TRACE
(
"(%p,%p,%p)
\n
"
,
device
,
pdsb
,
dsbd
);
*
pdsb
=
NULL
;
TRACE
(
"(%p,%p,%p)
\n
"
,
device
,
dsbd
,
buffer
);
if
(
dsbd
->
dwBufferBytes
<
DSBSIZE_MIN
||
dsbd
->
dwBufferBytes
>
DSBSIZE_MAX
)
{
WARN
(
"invalid parameter: dsbd->dwBufferBytes = %d
\n
"
,
dsbd
->
dwBufferBytes
);
...
...
@@ -1107,14 +1103,12 @@ HRESULT IDirectSoundBufferImpl_Create(
RtlInitializeResource
(
&
dsb
->
lock
);
/* register buffer if not primary */
if
(
!
(
dsbd
->
dwFlags
&
DSBCAPS_PRIMARYBUFFER
))
{
err
=
DirectSoundDevice_AddBuffer
(
device
,
dsb
);
if
(
err
==
DS_OK
)
*
pdsb
=
dsb
;
else
IDirectSoundBuffer8_Release
(
&
dsb
->
IDirectSoundBuffer8_iface
);
}
/* register buffer */
err
=
DirectSoundDevice_AddBuffer
(
device
,
dsb
);
if
(
err
==
DS_OK
)
*
buffer
=
(
IDirectSoundBuffer
*
)
&
dsb
->
IDirectSoundBuffer8_iface
;
else
IDirectSoundBuffer8_Release
(
&
dsb
->
IDirectSoundBuffer8_iface
);
return
err
;
}
...
...
dlls/dsound/dsound.c
View file @
bb72548f
...
...
@@ -469,8 +469,6 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
WARN
(
"primarybuffer_create() failed
\n
"
);
}
}
else
{
IDirectSoundBufferImpl
*
dsb
;
if
(
dsbd
->
lpwfxFormat
==
NULL
)
{
WARN
(
"invalid parameter: dsbd->lpwfxFormat can't be NULL for "
"secondary buffer
\n
"
);
...
...
@@ -547,9 +545,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
return
DSERR_INVALIDPARAM
;
}
hres
=
IDirectSoundBufferImpl_Create
(
device
,
&
dsb
,
dsbd
);
if
(
dsb
)
{
*
ppdsb
=
(
IDirectSoundBuffer
*
)
&
dsb
->
IDirectSoundBuffer8_iface
;
hres
=
secondarybuffer_create
(
device
,
dsbd
,
ppdsb
);
if
(
SUCCEEDED
(
hres
))
{
if
(
dsbd
->
dwFlags
&
DSBCAPS_LOCHARDWARE
)
device
->
drvcaps
.
dwFreeHwMixingAllBuffers
--
;
}
else
...
...
dlls/dsound/dsound_private.h
View file @
bb72548f
...
...
@@ -182,10 +182,8 @@ void put_stereo2quad(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD channel
void
put_mono2surround51
(
const
IDirectSoundBufferImpl
*
dsb
,
DWORD
pos
,
DWORD
channel
,
float
value
)
DECLSPEC_HIDDEN
;
void
put_stereo2surround51
(
const
IDirectSoundBufferImpl
*
dsb
,
DWORD
pos
,
DWORD
channel
,
float
value
)
DECLSPEC_HIDDEN
;
HRESULT
IDirectSoundBufferImpl_Create
(
DirectSoundDevice
*
device
,
IDirectSoundBufferImpl
**
ppdsb
,
LPCDSBUFFERDESC
dsbd
)
DECLSPEC_HIDDEN
;
HRESULT
secondarybuffer_create
(
DirectSoundDevice
*
device
,
const
DSBUFFERDESC
*
dsbd
,
IDirectSoundBuffer
**
buffer
)
DECLSPEC_HIDDEN
;
HRESULT
IDirectSoundBufferImpl_Duplicate
(
DirectSoundDevice
*
device
,
IDirectSoundBufferImpl
**
ppdsb
,
...
...
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