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
b805f0f1
Commit
b805f0f1
authored
Aug 20, 2003
by
Robert Reif
Committed by
Alexandre Julliard
Aug 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split property sets into two types: buffer and private.
parent
fbbe6a43
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
185 additions
and
53 deletions
+185
-53
buffer.c
dlls/dsound/buffer.c
+7
-1
dsound_main.c
dlls/dsound/dsound_main.c
+1
-1
dsound_private.h
dlls/dsound/dsound_private.h
+20
-6
propset.c
dlls/dsound/propset.c
+157
-45
No files found.
dlls/dsound/buffer.c
View file @
b805f0f1
...
...
@@ -962,13 +962,19 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(
}
if
(
IsEqualGUID
(
&
IID_IKsPropertySet
,
riid
)
)
{
/* only supported on hardware 3D secondary buffers */
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_PRIMARYBUFFER
)
&&
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRL3D
)
&&
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_LOCHARDWARE
)
&&
(
This
->
hwbuf
!=
NULL
)
)
{
if
(
!
This
->
iks
)
IKs
PropertySetImpl_Create
(
This
,
&
This
->
iks
);
IKsBuffer
PropertySetImpl_Create
(
This
,
&
This
->
iks
);
*
ppobj
=
This
->
iks
;
if
(
*
ppobj
)
{
IKsPropertySet_AddRef
((
LPKSPROPERTYSET
)
*
ppobj
);
return
S_OK
;
}
}
WARN
(
"IID_IKsPropertySet
\n
"
);
return
E_NOINTERFACE
;
}
...
...
dlls/dsound/dsound_main.c
View file @
b805f0f1
...
...
@@ -1235,7 +1235,7 @@ DSPCF_CreateInstance(
*
ppobj
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IKsPropertySet
,
riid
)
)
{
return
IKsPr
opertySetImpl_Create
(
0
,(
IKs
PropertySetImpl
**
)
ppobj
);
return
IKsPr
ivatePropertySetImpl_Create
((
IKsPrivate
PropertySetImpl
**
)
ppobj
);
}
WARN
(
"(%p,%p,%s,%p) Interface not found!
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
...
...
dlls/dsound/dsound_private.h
View file @
b805f0f1
...
...
@@ -52,7 +52,8 @@ typedef struct IDirectSoundFullDuplexImpl IDirectSoundFullDuplexImpl;
typedef
struct
IDirectSoundNotifyImpl
IDirectSoundNotifyImpl
;
typedef
struct
IDirectSound3DListenerImpl
IDirectSound3DListenerImpl
;
typedef
struct
IDirectSound3DBufferImpl
IDirectSound3DBufferImpl
;
typedef
struct
IKsPropertySetImpl
IKsPropertySetImpl
;
typedef
struct
IKsBufferPropertySetImpl
IKsBufferPropertySetImpl
;
typedef
struct
IKsPrivatePropertySetImpl
IKsPrivatePropertySetImpl
;
typedef
struct
PrimaryBufferImpl
PrimaryBufferImpl
;
typedef
struct
IClassFactoryImpl
IClassFactoryImpl
;
...
...
@@ -113,7 +114,7 @@ struct IDirectSoundBufferImpl
/* IDirectSoundBufferImpl fields */
IDirectSoundImpl
*
dsound
;
IDirectSound3DBufferImpl
*
ds3db
;
IKs
PropertySetImpl
*
iks
;
IKs
BufferPropertySetImpl
*
iks
;
CRITICAL_SECTION
lock
;
PIDSDRIVERBUFFER
hwbuf
;
WAVEFORMATEX
wfx
;
...
...
@@ -256,9 +257,9 @@ HRESULT WINAPI IDirectSound3DListenerImpl_Create(
IDirectSound3DListenerImpl
**
pdsl
);
/*****************************************************************************
* IKsPropertySet implementation structure
* IKs
Buffer
PropertySet implementation structure
*/
struct
IKsPropertySetImpl
struct
IKs
Buffer
PropertySetImpl
{
/* IUnknown fields */
ICOM_VFIELD
(
IKsPropertySet
);
...
...
@@ -267,9 +268,22 @@ struct IKsPropertySetImpl
IDirectSoundBufferImpl
*
dsb
;
};
HRESULT
WINAPI
IKsPropertySetImpl_Create
(
HRESULT
WINAPI
IKs
Buffer
PropertySetImpl_Create
(
IDirectSoundBufferImpl
*
This
,
IKsPropertySetImpl
**
piks
);
IKsBufferPropertySetImpl
**
piks
);
/*****************************************************************************
* IKsPrivatePropertySet implementation structure
*/
struct
IKsPrivatePropertySetImpl
{
/* IUnknown fields */
ICOM_VFIELD
(
IKsPropertySet
);
DWORD
ref
;
};
HRESULT
WINAPI
IKsPrivatePropertySetImpl_Create
(
IKsPrivatePropertySetImpl
**
piks
);
/*****************************************************************************
* IDirectSound3DBuffer implementation structure
...
...
dlls/dsound/propset.c
View file @
b805f0f1
...
...
@@ -51,28 +51,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
/*******************************************************************************
* IKsPropertySet
* IKs
Buffer
PropertySet
*/
/* IUnknown methods */
static
HRESULT
WINAPI
IKsPropertySetImpl_QueryInterface
(
LPKSPROPERTYSET
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
static
HRESULT
WINAPI
IKsBufferPropertySetImpl_QueryInterface
(
LPKSPROPERTYSET
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ICOM_THIS
(
IKsBufferPropertySetImpl
,
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
/* FIXME: split this for DirectSoundPrivate */
if
(
This
->
dsb
==
NULL
)
{
FIXME
(
"not used on a buffer
\n
"
);
return
DSERR_INVALIDPARAM
;
}
return
IDirectSoundBuffer_QueryInterface
((
LPDIRECTSOUNDBUFFER8
)
This
->
dsb
,
riid
,
ppobj
);
}
static
ULONG
WINAPI
IKsPropertySetImpl_AddRef
(
LPKSPROPERTYSET
iface
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
static
ULONG
WINAPI
IKsBufferPropertySetImpl_AddRef
(
LPKSPROPERTYSET
iface
)
{
ICOM_THIS
(
IKsBufferPropertySetImpl
,
iface
);
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
...
...
@@ -82,8 +78,9 @@ static ULONG WINAPI IKsPropertySetImpl_AddRef(LPKSPROPERTYSET iface) {
return
ulReturn
;
}
static
ULONG
WINAPI
IKsPropertySetImpl_Release
(
LPKSPROPERTYSET
iface
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
static
ULONG
WINAPI
IKsBufferPropertySetImpl_Release
(
LPKSPROPERTYSET
iface
)
{
ICOM_THIS
(
IKsBufferPropertySetImpl
,
iface
);
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
...
...
@@ -94,6 +91,112 @@ static ULONG WINAPI IKsPropertySetImpl_Release(LPKSPROPERTYSET iface) {
return
0
;
}
static
HRESULT
WINAPI
IKsBufferPropertySetImpl_Get
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
LPVOID
pInstanceData
,
ULONG
cbInstanceData
,
LPVOID
pPropData
,
ULONG
cbPropData
,
PULONG
pcbReturned
)
{
ICOM_THIS
(
IKsBufferPropertySetImpl
,
iface
);
FIXME
(
"(iface=%p,guidPropSet=%s,dwPropID=%ld,pInstanceData=%p,cbInstanceData=%ld,pPropData=%p,cbPropData=%ld,pcbReturned=%p) stub!
\n
"
,
This
,
debugstr_guid
(
guidPropSet
),
dwPropID
,
pInstanceData
,
cbInstanceData
,
pPropData
,
cbPropData
,
pcbReturned
);
return
E_PROP_ID_UNSUPPORTED
;
}
static
HRESULT
WINAPI
IKsBufferPropertySetImpl_Set
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
LPVOID
pInstanceData
,
ULONG
cbInstanceData
,
LPVOID
pPropData
,
ULONG
cbPropData
)
{
ICOM_THIS
(
IKsBufferPropertySetImpl
,
iface
);
FIXME
(
"(%p,%s,%ld,%p,%ld,%p,%ld), stub!
\n
"
,
This
,
debugstr_guid
(
guidPropSet
),
dwPropID
,
pInstanceData
,
cbInstanceData
,
pPropData
,
cbPropData
);
return
E_PROP_ID_UNSUPPORTED
;
}
static
HRESULT
WINAPI
IKsBufferPropertySetImpl_QuerySupport
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
PULONG
pTypeSupport
)
{
ICOM_THIS
(
IKsBufferPropertySetImpl
,
iface
);
FIXME
(
"(%p,%s,%ld,%p) stub!
\n
"
,
This
,
debugstr_guid
(
guidPropSet
),
dwPropID
,
pTypeSupport
);
return
E_PROP_ID_UNSUPPORTED
;
}
static
ICOM_VTABLE
(
IKsPropertySet
)
iksbvt
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IKsBufferPropertySetImpl_QueryInterface
,
IKsBufferPropertySetImpl_AddRef
,
IKsBufferPropertySetImpl_Release
,
IKsBufferPropertySetImpl_Get
,
IKsBufferPropertySetImpl_Set
,
IKsBufferPropertySetImpl_QuerySupport
};
HRESULT
WINAPI
IKsBufferPropertySetImpl_Create
(
IDirectSoundBufferImpl
*
This
,
IKsBufferPropertySetImpl
**
piks
)
{
IKsBufferPropertySetImpl
*
iks
;
iks
=
(
IKsBufferPropertySetImpl
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
iks
));
iks
->
ref
=
0
;
iks
->
dsb
=
This
;
iks
->
lpVtbl
=
&
iksbvt
;
*
piks
=
iks
;
return
S_OK
;
}
/*******************************************************************************
* IKsPrivatePropertySet
*/
/* IUnknown methods */
static
HRESULT
WINAPI
IKsPrivatePropertySetImpl_QueryInterface
(
LPKSPROPERTYSET
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ICOM_THIS
(
IKsPrivatePropertySetImpl
,
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
*
ppobj
=
NULL
;
return
DSERR_INVALIDPARAM
;
}
static
ULONG
WINAPI
IKsPrivatePropertySetImpl_AddRef
(
LPKSPROPERTYSET
iface
)
{
ICOM_THIS
(
IKsPrivatePropertySetImpl
,
iface
);
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
ulReturn
=
InterlockedIncrement
(
&
This
->
ref
);
return
ulReturn
;
}
static
ULONG
WINAPI
IKsPrivatePropertySetImpl_Release
(
LPKSPROPERTYSET
iface
)
{
ICOM_THIS
(
IKsPrivatePropertySetImpl
,
iface
);
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
This
->
ref
);
return
ulReturn
;
}
static
HRESULT
WINAPI
DSPROPERTY_WaveDeviceMappingA
(
REFGUID
guidPropSet
,
LPVOID
pPropData
,
...
...
@@ -581,13 +684,17 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
return
E_PROP_ID_UNSUPPORTED
;
}
static
HRESULT
WINAPI
IKsPropertySetImpl_Get
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
LPVOID
pInstanceData
,
ULONG
cbInstanceData
,
LPVOID
pPropData
,
ULONG
cbPropData
,
static
HRESULT
WINAPI
IKsPrivatePropertySetImpl_Get
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
LPVOID
pInstanceData
,
ULONG
cbInstanceData
,
LPVOID
pPropData
,
ULONG
cbPropData
,
PULONG
pcbReturned
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
ICOM_THIS
(
IKsPr
ivatePr
opertySetImpl
,
iface
);
TRACE
(
"(iface=%p,guidPropSet=%s,dwPropID=%ld,pInstanceData=%p,cbInstanceData=%ld,pPropData=%p,cbPropData=%ld,pcbReturned=%p)
\n
"
,
This
,
debugstr_guid
(
guidPropSet
),
dwPropID
,
pInstanceData
,
cbInstanceData
,
pPropData
,
cbPropData
,
pcbReturned
);
...
...
@@ -625,21 +732,28 @@ static HRESULT WINAPI IKsPropertySetImpl_Get(LPKSPROPERTYSET iface,
return
E_PROP_ID_UNSUPPORTED
;
}
static
HRESULT
WINAPI
IKsPropertySetImpl_Set
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
LPVOID
pInstanceData
,
ULONG
cbInstanceData
,
LPVOID
pPropData
,
ULONG
cbPropData
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
static
HRESULT
WINAPI
IKsPrivatePropertySetImpl_Set
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
LPVOID
pInstanceData
,
ULONG
cbInstanceData
,
LPVOID
pPropData
,
ULONG
cbPropData
)
{
ICOM_THIS
(
IKsPrivatePropertySetImpl
,
iface
);
FIXME
(
"(%p,%s,%ld,%p,%ld,%p,%ld), stub!
\n
"
,
This
,
debugstr_guid
(
guidPropSet
),
dwPropID
,
pInstanceData
,
cbInstanceData
,
pPropData
,
cbPropData
);
return
E_PROP_ID_UNSUPPORTED
;
}
static
HRESULT
WINAPI
IKsPropertySetImpl_QuerySupport
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
PULONG
pTypeSupport
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
static
HRESULT
WINAPI
IKsPrivatePropertySetImpl_QuerySupport
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
PULONG
pTypeSupport
)
{
ICOM_THIS
(
IKsPrivatePropertySetImpl
,
iface
);
TRACE
(
"(%p,%s,%ld,%p)
\n
"
,
This
,
debugstr_guid
(
guidPropSet
),
dwPropID
,
pTypeSupport
);
if
(
IsEqualGUID
(
&
DSPROPSETID_DirectSoundDevice
,
guidPropSet
)
)
{
...
...
@@ -679,26 +793,24 @@ static HRESULT WINAPI IKsPropertySetImpl_QuerySupport(LPKSPROPERTYSET iface,
return
E_PROP_ID_UNSUPPORTED
;
}
static
ICOM_VTABLE
(
IKsPropertySet
)
iksvt
=
{
static
ICOM_VTABLE
(
IKsPropertySet
)
iks
p
vt
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IKs
PropertySetImpl_QueryInterface
,
IKs
PropertySetImpl_AddRef
,
IKs
PropertySetImpl_Release
,
IKs
PropertySetImpl_Get
,
IKs
PropertySetImpl_Set
,
IKs
PropertySetImpl_QuerySupport
IKsPrivate
PropertySetImpl_QueryInterface
,
IKsPrivate
PropertySetImpl_AddRef
,
IKsPrivate
PropertySetImpl_Release
,
IKsPrivate
PropertySetImpl_Get
,
IKsPrivate
PropertySetImpl_Set
,
IKsPrivate
PropertySetImpl_QuerySupport
};
HRESULT
WINAPI
IKsPropertySetImpl_Create
(
IDirectSoundBufferImpl
*
This
,
IKsPropertySetImpl
**
piks
)
HRESULT
WINAPI
IKsPrivatePropertySetImpl_Create
(
IKsPrivatePropertySetImpl
**
piks
)
{
IKs
PropertySetImpl
*
iks
;
IKsPrivate
PropertySetImpl
*
iks
;
iks
=
(
IKs
PropertySetImpl
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
iks
));
iks
=
(
IKsPrivate
PropertySetImpl
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
iks
));
iks
->
ref
=
0
;
iks
->
dsb
=
This
;
iks
->
lpVtbl
=
&
iksvt
;
iks
->
lpVtbl
=
&
ikspvt
;
*
piks
=
iks
;
return
S_OK
;
...
...
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