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
e0d81e55
Commit
e0d81e55
authored
Jan 19, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Merge IDirectSound3DBuffer into the secondary buffer object.
parent
a5d21200
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
35 deletions
+7
-35
buffer.c
dlls/dsound/buffer.c
+5
-15
dsound_private.h
dlls/dsound/dsound_private.h
+2
-20
sound3d.c
dlls/dsound/sound3d.c
+0
-0
No files found.
dlls/dsound/buffer.c
View file @
e0d81e55
...
@@ -812,16 +812,10 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(IDirectSoundBuffer8
...
@@ -812,16 +812,10 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(IDirectSoundBuffer8
}
}
if
(
IsEqualGUID
(
&
IID_IDirectSound3DBuffer
,
riid
)
)
{
if
(
IsEqualGUID
(
&
IID_IDirectSound3DBuffer
,
riid
)
)
{
if
(
!
This
->
ds3db
)
IDirectSound3DBuffer_AddRef
(
&
This
->
IDirectSound3DBuffer_iface
);
IDirectSound3DBufferImpl_Create
(
This
,
&
(
This
->
ds3db
));
*
ppobj
=
&
This
->
IDirectSound3DBuffer_iface
;
if
(
This
->
ds3db
)
{
IDirectSound3DBuffer_AddRef
((
LPDIRECTSOUND3DBUFFER
)
This
->
ds3db
);
*
ppobj
=
This
->
ds3db
;
return
S_OK
;
return
S_OK
;
}
}
WARN
(
"IID_IDirectSound3DBuffer
\n
"
);
return
E_NOINTERFACE
;
}
if
(
IsEqualGUID
(
&
IID_IDirectSound3DListener
,
riid
)
)
{
if
(
IsEqualGUID
(
&
IID_IDirectSound3DListener
,
riid
)
)
{
ERR
(
"app requested IDirectSound3DListener on secondary buffer
\n
"
);
ERR
(
"app requested IDirectSound3DListener on secondary buffer
\n
"
);
...
@@ -895,10 +889,12 @@ HRESULT IDirectSoundBufferImpl_Create(
...
@@ -895,10 +889,12 @@ HRESULT IDirectSoundBufferImpl_Create(
TRACE
(
"Created buffer at %p
\n
"
,
dsb
);
TRACE
(
"Created buffer at %p
\n
"
,
dsb
);
dsb
->
ref
=
0
;
dsb
->
ref
=
0
;
dsb
->
ref3D
=
0
;
dsb
->
refiks
=
0
;
dsb
->
refiks
=
0
;
dsb
->
numIfaces
=
0
;
dsb
->
numIfaces
=
0
;
dsb
->
device
=
device
;
dsb
->
device
=
device
;
dsb
->
IDirectSoundBuffer8_iface
.
lpVtbl
=
&
dsbvt
;
dsb
->
IDirectSoundBuffer8_iface
.
lpVtbl
=
&
dsbvt
;
dsb
->
IDirectSound3DBuffer_iface
.
lpVtbl
=
&
ds3dbvt
;
dsb
->
IKsPropertySet_iface
.
lpVtbl
=
&
iksbvt
;
dsb
->
IKsPropertySet_iface
.
lpVtbl
=
&
iksbvt
;
/* size depends on version */
/* size depends on version */
...
@@ -1040,12 +1036,6 @@ HRESULT IDirectSoundBufferImpl_Destroy(
...
@@ -1040,12 +1036,6 @@ HRESULT IDirectSoundBufferImpl_Destroy(
* this object until it is ready to be deleted */
* this object until it is ready to be deleted */
InterlockedIncrement
(
&
pdsb
->
numIfaces
);
InterlockedIncrement
(
&
pdsb
->
numIfaces
);
if
(
pdsb
->
ds3db
)
{
WARN
(
"ds3db not NULL
\n
"
);
IDirectSound3DBufferImpl_Destroy
(
pdsb
->
ds3db
);
pdsb
->
ds3db
=
NULL
;
}
if
(
pdsb
->
notify
)
{
if
(
pdsb
->
notify
)
{
WARN
(
"notify not NULL
\n
"
);
WARN
(
"notify not NULL
\n
"
);
IDirectSoundNotifyImpl_Destroy
(
pdsb
->
notify
);
IDirectSoundNotifyImpl_Destroy
(
pdsb
->
notify
);
...
@@ -1090,6 +1080,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
...
@@ -1090,6 +1080,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
dsb
->
buffer
->
ref
++
;
dsb
->
buffer
->
ref
++
;
list_add_head
(
&
dsb
->
buffer
->
buffers
,
&
dsb
->
entry
);
list_add_head
(
&
dsb
->
buffer
->
buffers
,
&
dsb
->
entry
);
dsb
->
ref
=
0
;
dsb
->
ref
=
0
;
dsb
->
ref3D
=
0
;
dsb
->
refiks
=
0
;
dsb
->
refiks
=
0
;
dsb
->
numIfaces
=
0
;
dsb
->
numIfaces
=
0
;
dsb
->
state
=
STATE_STOPPED
;
dsb
->
state
=
STATE_STOPPED
;
...
@@ -1098,7 +1089,6 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
...
@@ -1098,7 +1089,6 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
dsb
->
notifies
=
NULL
;
dsb
->
notifies
=
NULL
;
dsb
->
nrofnotifies
=
0
;
dsb
->
nrofnotifies
=
0
;
dsb
->
device
=
device
;
dsb
->
device
=
device
;
dsb
->
ds3db
=
NULL
;
DSOUND_RecalcFormat
(
dsb
);
DSOUND_RecalcFormat
(
dsb
);
RtlInitializeResource
(
&
dsb
->
lock
);
RtlInitializeResource
(
&
dsb
->
lock
);
...
...
dlls/dsound/dsound_private.h
View file @
e0d81e55
...
@@ -49,7 +49,6 @@ typedef struct IDirectSoundBufferImpl IDirectSoundBufferImpl;
...
@@ -49,7 +49,6 @@ typedef struct IDirectSoundBufferImpl IDirectSoundBufferImpl;
typedef
struct
IDirectSoundCaptureImpl
IDirectSoundCaptureImpl
;
typedef
struct
IDirectSoundCaptureImpl
IDirectSoundCaptureImpl
;
typedef
struct
IDirectSoundCaptureBufferImpl
IDirectSoundCaptureBufferImpl
;
typedef
struct
IDirectSoundCaptureBufferImpl
IDirectSoundCaptureBufferImpl
;
typedef
struct
IDirectSoundNotifyImpl
IDirectSoundNotifyImpl
;
typedef
struct
IDirectSoundNotifyImpl
IDirectSoundNotifyImpl
;
typedef
struct
IDirectSound3DBufferImpl
IDirectSound3DBufferImpl
;
typedef
struct
DirectSoundDevice
DirectSoundDevice
;
typedef
struct
DirectSoundDevice
DirectSoundDevice
;
typedef
struct
DirectSoundCaptureDevice
DirectSoundCaptureDevice
;
typedef
struct
DirectSoundCaptureDevice
DirectSoundCaptureDevice
;
...
@@ -165,6 +164,7 @@ struct IDirectSoundBufferImpl
...
@@ -165,6 +164,7 @@ struct IDirectSoundBufferImpl
{
{
IDirectSoundBuffer8
IDirectSoundBuffer8_iface
;
IDirectSoundBuffer8
IDirectSoundBuffer8_iface
;
IDirectSound3DListener
IDirectSound3DListener_iface
;
/* only primary buffer */
IDirectSound3DListener
IDirectSound3DListener_iface
;
/* only primary buffer */
IDirectSound3DBuffer
IDirectSound3DBuffer_iface
;
/* only secondary buffer */
IKsPropertySet
IKsPropertySet_iface
;
IKsPropertySet
IKsPropertySet_iface
;
LONG
numIfaces
;
/* "in use interfaces" refcount */
LONG
numIfaces
;
/* "in use interfaces" refcount */
LONG
ref
,
ref3D
,
refiks
;
LONG
ref
,
ref3D
,
refiks
;
...
@@ -190,7 +190,6 @@ struct IDirectSoundBufferImpl
...
@@ -190,7 +190,6 @@ struct IDirectSoundBufferImpl
int
nrofnotifies
;
int
nrofnotifies
;
/* DirectSound3DBuffer fields */
/* DirectSound3DBuffer fields */
IDirectSound3DBufferImpl
*
ds3db
;
DS3DBUFFER
ds3db_ds3db
;
DS3DBUFFER
ds3db_ds3db
;
LONG
ds3db_lVolume
;
LONG
ds3db_lVolume
;
BOOL
ds3db_need_recalc
;
BOOL
ds3db_need_recalc
;
...
@@ -211,6 +210,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
...
@@ -211,6 +210,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
IDirectSoundBufferImpl
*
pdsb
)
DECLSPEC_HIDDEN
;
IDirectSoundBufferImpl
*
pdsb
)
DECLSPEC_HIDDEN
;
void
secondarybuffer_destroy
(
IDirectSoundBufferImpl
*
This
)
DECLSPEC_HIDDEN
;
void
secondarybuffer_destroy
(
IDirectSoundBufferImpl
*
This
)
DECLSPEC_HIDDEN
;
const
IDirectSound3DListenerVtbl
ds3dlvt
DECLSPEC_HIDDEN
;
const
IDirectSound3DListenerVtbl
ds3dlvt
DECLSPEC_HIDDEN
;
const
IDirectSound3DBufferVtbl
ds3dbvt
DECLSPEC_HIDDEN
;
const
IKsPropertySetVtbl
iksbvt
DECLSPEC_HIDDEN
;
const
IKsPropertySetVtbl
iksbvt
DECLSPEC_HIDDEN
;
/*****************************************************************************
/*****************************************************************************
...
@@ -260,24 +260,6 @@ struct IDirectSoundCaptureBufferImpl
...
@@ -260,24 +260,6 @@ struct IDirectSoundCaptureBufferImpl
HRESULT
IKsPrivatePropertySetImpl_Create
(
REFIID
riid
,
IKsPropertySet
**
piks
)
DECLSPEC_HIDDEN
;
HRESULT
IKsPrivatePropertySetImpl_Create
(
REFIID
riid
,
IKsPropertySet
**
piks
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* IDirectSound3DBuffer implementation structure
*/
struct
IDirectSound3DBufferImpl
{
/* IUnknown fields */
const
IDirectSound3DBufferVtbl
*
lpVtbl
;
LONG
ref
;
/* IDirectSound3DBufferImpl fields */
IDirectSoundBufferImpl
*
dsb
;
};
HRESULT
IDirectSound3DBufferImpl_Create
(
IDirectSoundBufferImpl
*
dsb
,
IDirectSound3DBufferImpl
**
pds3db
)
DECLSPEC_HIDDEN
;
HRESULT
IDirectSound3DBufferImpl_Destroy
(
IDirectSound3DBufferImpl
*
pds3db
)
DECLSPEC_HIDDEN
;
/*******************************************************************************
/*******************************************************************************
*/
*/
...
...
dlls/dsound/sound3d.c
View file @
e0d81e55
This diff is collapsed.
Click to expand it.
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