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
9c0ae56d
Commit
9c0ae56d
authored
Jun 13, 2001
by
Marcus Meissner
Committed by
Alexandre Julliard
Jun 13, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added definitions for IKsPropertySet, small stub implementation for
IDirectSound3DBuffer. Fixed one pointer reference.
parent
737e624d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
125 additions
and
4 deletions
+125
-4
dsound_main.c
dlls/dsound/dsound_main.c
+100
-3
dsound.h
include/dsound.h
+21
-1
winerror.h
include/winerror.h
+4
-0
No files found.
dlls/dsound/dsound_main.c
View file @
9c0ae56d
...
...
@@ -72,6 +72,7 @@ typedef struct IDirectSound3DListenerImpl IDirectSound3DListenerImpl;
typedef
struct
IDirectSound3DBufferImpl
IDirectSound3DBufferImpl
;
typedef
struct
IDirectSoundCaptureImpl
IDirectSoundCaptureImpl
;
typedef
struct
IDirectSoundCaptureBufferImpl
IDirectSoundCaptureBufferImpl
;
typedef
struct
IKsPropertySetImpl
IKsPropertySetImpl
;
/*****************************************************************************
* IDirectSound implementation structure
...
...
@@ -161,6 +162,15 @@ struct IDirectSound3DListenerImpl
CRITICAL_SECTION
lock
;
};
struct
IKsPropertySetImpl
{
/* IUnknown fields */
ICOM_VFIELD
(
IKsPropertySet
);
DWORD
ref
;
/* IKsPropertySetImpl fields */
IDirectSound3DBufferImpl
*
ds3db
;
/* backptr, no ref */
};
/*****************************************************************************
* IDirectSound3DBuffer implementation structure
*/
...
...
@@ -175,6 +185,7 @@ struct IDirectSound3DBufferImpl
LPBYTE
buffer
;
DWORD
buflen
;
CRITICAL_SECTION
lock
;
IKsPropertySetImpl
*
iks
;
};
...
...
@@ -318,6 +329,76 @@ static void _dump_DSBCAPS(DWORD xmask) {
}
/*******************************************************************************
* IKsPropertySet
*/
/* IUnknown methods */
static
HRESULT
WINAPI
IKsPropertySetImpl_QueryInterface
(
LPKSPROPERTYSET
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
FIXME
(
"(%p,%s,%p), stub!
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_FAIL
;
}
static
ULONG
WINAPI
IKsPropertySetImpl_AddRef
(
LPKSPROPERTYSET
iface
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
This
->
ref
++
;
return
This
->
ref
;
}
static
ULONG
WINAPI
IKsPropertySetImpl_Release
(
LPKSPROPERTYSET
iface
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
This
->
ref
--
;
return
This
->
ref
;
}
static
HRESULT
WINAPI
IKsPropertySetImpl_Get
(
LPKSPROPERTYSET
iface
,
REFGUID
guidPropSet
,
ULONG
dwPropID
,
LPVOID
pInstanceData
,
ULONG
cbInstanceData
,
LPVOID
pPropData
,
ULONG
cbPropData
,
PULONG
pcbReturned
)
{
ICOM_THIS
(
IKsPropertySetImpl
,
iface
);
FIXME
(
"(%p,%s,%ld,%p,%ld,%p,%ld,%p), stub!
\n
"
,
This
,
debugstr_guid
(
guidPropSet
),
dwPropID
,
pInstanceData
,
cbInstanceData
,
pPropData
,
cbPropData
,
pcbReturned
);
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
);
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
);
FIXME
(
"(%p,%s,%ld,%p), stub!
\n
"
,
This
,
debugstr_guid
(
guidPropSet
),
dwPropID
,
pTypeSupport
);
return
E_PROP_ID_UNSUPPORTED
;
}
static
ICOM_VTABLE
(
IKsPropertySet
)
iksvt
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IKsPropertySetImpl_QueryInterface
,
IKsPropertySetImpl_AddRef
,
IKsPropertySetImpl_Release
,
IKsPropertySetImpl_Get
,
IKsPropertySetImpl_Set
,
IKsPropertySetImpl_QuerySupport
};
/*******************************************************************************
* IDirectSound3DBuffer
*/
...
...
@@ -328,7 +409,13 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_QueryInterface(
{
ICOM_THIS
(
IDirectSound3DBufferImpl
,
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
&
IID_IKsPropertySet
,
riid
)
)
{
IDirectSound3DBuffer_AddRef
(
iface
);
*
ppobj
=
This
->
iks
;
return
S_OK
;
}
FIXME
(
"(%p,%s,%p), no such interface.
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_FAIL
;
}
#endif
...
...
@@ -1777,7 +1864,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(
ICOM_VTBL
(
ds3db
)
=
&
ds3dbvt
;
InitializeCriticalSection
(
&
ds3db
->
lock
);
IDirectSoundBuffer_AddRef
(
(
LPDIRECTSOUNDBUFFER
)
This
);
IDirectSoundBuffer_AddRef
(
iface
);
ds3db
->
ds3db
.
dwSize
=
sizeof
(
DS3DBUFFER
);
ds3db
->
ds3db
.
vPosition
.
u1
.
x
=
0
.
0
;
...
...
@@ -1802,6 +1889,11 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(
ds3db
->
ds3db
.
dwMode
=
DS3DMODE_DISABLE
;
}
ds3db
->
iks
=
(
IKsPropertySetImpl
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
(
ds3db
->
iks
)));
ds3db
->
iks
->
ref
=
1
;
ds3db
->
iks
->
ds3db
=
ds3db
;
ICOM_VTBL
(
ds3db
->
iks
)
=
&
iksvt
;
return
S_OK
;
}
#else
...
...
@@ -2067,7 +2159,7 @@ static HRESULT WINAPI IDirectSoundImpl_CreateSoundBuffer(
(
*
ippdsb
)
->
ds3db
=
ds3db
;
ds3db
->
dsb
=
(
*
ippdsb
);
IDirectSoundBufferImpl_AddRef
((
LPDIRECTSOUNDBUFFER
)
ippdsb
);
IDirectSoundBufferImpl_AddRef
((
LPDIRECTSOUNDBUFFER
)
(
*
ippdsb
)
);
InitializeCriticalSection
(
&
ds3db
->
lock
);
...
...
@@ -2094,6 +2186,11 @@ static HRESULT WINAPI IDirectSoundImpl_CreateSoundBuffer(
ds3db
->
buflen
=
0
;
ds3db
->
ds3db
.
dwMode
=
DS3DMODE_DISABLE
;
}
ds3db
->
iks
=
(
IKsPropertySetImpl
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
(
ds3db
->
iks
)));
ds3db
->
iks
->
ref
=
1
;
ds3db
->
iks
->
ds3db
=
ds3db
;
ICOM_VTBL
(
ds3db
->
iks
)
=
&
iksvt
;
}
#endif
return
DS_OK
;
...
...
include/dsound.h
View file @
9c0ae56d
...
...
@@ -36,6 +36,7 @@ DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x0
typedef
struct
IDirectSoundCaptureBuffer
IDirectSoundCaptureBuffer
,
*
LPDIRECTSOUNDCAPTUREBUFFER
;
DEFINE_GUID
(
IID_IKsPropertySet
,
0x31EFAC30
,
0x515C
,
0x11D0
,
0xA9
,
0xAA
,
0x00
,
0xAA
,
0x00
,
0x61
,
0xBE
,
0x93
);
typedef
struct
IKsPropertySet
IKsPropertySet
,
*
LPKSPROPERTYSET
;
#define _FACDS 0x878
...
...
@@ -554,7 +555,26 @@ ICOM_DEFINE(IDirectSound3DBuffer,IUnknown)
/*****************************************************************************
* IKsPropertySet interface
*/
/* FIXME: not implemented yet */
#define KSPROPERTY_SUPPORT_GET 1
#define KSPROPERTY_SUPPORT_SET 2
#define ICOM_INTERFACE IKsPropertySet
#define IKsPropertySet_METHODS \
ICOM_METHOD7(HRESULT,Get,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3,ULONG*,px4);\
ICOM_METHOD6(HRESULT,Set,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3);\
ICOM_METHOD3(HRESULT,QuerySupport,REFGUID,rgid,ULONG,x1,ULONG*,px2);
#define IKsPropertySet_IMETHODS \
IUnknown_IMETHODS \
IKsPropertySet_METHODS
ICOM_DEFINE
(
IKsPropertySet
,
IUnknown
)
#undef ICOM_INTERFACE
#define IKsPropertySet_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IKsPropertySet_AddRef(p) ICOM_CALL (AddRef,p)
#define IKsPropertySet_Release(p) ICOM_CALL (Release,p)
#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) ICOM_CALL7(Get,p,a,b,c,d,e,f,g)
#define IKsPropertySet_Set(p,a,b,c,d,e,f) ICOM_CALL6(Set,p,a,b,c,d,e,f)
#define IKsPropertySet_QuerySupport(p,a,b,c) ICOM_CALL3(QuerySupport,p,a,b,c)
#ifdef __cplusplus
}
/* extern "C" */
...
...
include/winerror.h
View file @
9c0ae56d
...
...
@@ -1879,6 +1879,10 @@ extern int WIN32_LastError;
#define E_OUTOFMEMORY 0x8007000EL
#define E_INVALIDARG 0x80070057L
/* For IKsPropertySets */
#define E_PROP_ID_UNSUPPORTED 0x80070490L
#define E_PROP_SET_UNSUPPORTED 0x80070492L
#define CO_S_NOTALLINTERFACES 0x00080012L
#define CO_E_CLASS_CREATE_FAILED 0x80080001L
...
...
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