3 * Copyright 1998 Marcus Meissner
4 * Copyright 1998 Rob Riggs
5 * Copyright 2000-2002 TransGaming Technologies, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include <sys/types.h>
26 #include <sys/fcntl.h>
32 #include <math.h> /* Insomnia - pow() function */
42 #include "wine/windef16.h"
43 #include "wine/debug.h"
46 #include "dsound_private.h"
48 WINE_DEFAULT_DEBUG_CHANNEL(dsound
);
51 /*******************************************************************************
55 /* IUnknown methods */
56 static HRESULT WINAPI
IKsPropertySetImpl_QueryInterface(
57 LPKSPROPERTYSET iface
, REFIID riid
, LPVOID
*ppobj
59 ICOM_THIS(IKsPropertySetImpl
,iface
);
61 TRACE("(%p,%s,%p)\n",This
,debugstr_guid(riid
),ppobj
);
62 return IDirectSoundBuffer_QueryInterface((LPDIRECTSOUNDBUFFER8
)This
->dsb
, riid
, ppobj
);
65 static ULONG WINAPI
IKsPropertySetImpl_AddRef(LPKSPROPERTYSET iface
) {
66 ICOM_THIS(IKsPropertySetImpl
,iface
);
69 ulReturn
= InterlockedIncrement(&This
->ref
);
71 IDirectSoundBuffer_AddRef((LPDIRECTSOUND3DBUFFER
)This
->dsb
);
75 static ULONG WINAPI
IKsPropertySetImpl_Release(LPKSPROPERTYSET iface
) {
76 ICOM_THIS(IKsPropertySetImpl
,iface
);
79 ulReturn
= InterlockedDecrement(&This
->ref
);
82 IDirectSoundBuffer_Release((LPDIRECTSOUND3DBUFFER
)This
->dsb
);
86 static HRESULT WINAPI
IKsPropertySetImpl_Get(LPKSPROPERTYSET iface
,
87 REFGUID guidPropSet
, ULONG dwPropID
,
88 LPVOID pInstanceData
, ULONG cbInstanceData
,
89 LPVOID pPropData
, ULONG cbPropData
,
92 ICOM_THIS(IKsPropertySetImpl
,iface
);
94 FIXME("(%p,%s,%ld,%p,%ld,%p,%ld,%p), stub!\n",This
,debugstr_guid(guidPropSet
),dwPropID
,pInstanceData
,cbInstanceData
,pPropData
,cbPropData
,pcbReturned
);
95 return E_PROP_ID_UNSUPPORTED
;
98 static HRESULT WINAPI
IKsPropertySetImpl_Set(LPKSPROPERTYSET iface
,
99 REFGUID guidPropSet
, ULONG dwPropID
,
100 LPVOID pInstanceData
, ULONG cbInstanceData
,
101 LPVOID pPropData
, ULONG cbPropData
103 ICOM_THIS(IKsPropertySetImpl
,iface
);
105 FIXME("(%p,%s,%ld,%p,%ld,%p,%ld), stub!\n",This
,debugstr_guid(guidPropSet
),dwPropID
,pInstanceData
,cbInstanceData
,pPropData
,cbPropData
);
106 return E_PROP_ID_UNSUPPORTED
;
109 static HRESULT WINAPI
IKsPropertySetImpl_QuerySupport(LPKSPROPERTYSET iface
,
110 REFGUID guidPropSet
, ULONG dwPropID
, PULONG pTypeSupport
112 ICOM_THIS(IKsPropertySetImpl
,iface
);
114 FIXME("(%p,%s,%ld,%p), stub!\n",This
,debugstr_guid(guidPropSet
),dwPropID
,pTypeSupport
);
115 return E_PROP_ID_UNSUPPORTED
;
118 static ICOM_VTABLE(IKsPropertySet
) iksvt
= {
119 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
120 IKsPropertySetImpl_QueryInterface
,
121 IKsPropertySetImpl_AddRef
,
122 IKsPropertySetImpl_Release
,
123 IKsPropertySetImpl_Get
,
124 IKsPropertySetImpl_Set
,
125 IKsPropertySetImpl_QuerySupport
128 HRESULT WINAPI
IKsPropertySetImpl_Create(
129 IDirectSoundBufferImpl
*This
,
130 IKsPropertySetImpl
**piks
)
132 IKsPropertySetImpl
*iks
;
134 iks
= (IKsPropertySetImpl
*)HeapAlloc(GetProcessHeap(),0,sizeof(*iks
));
137 ICOM_VTBL(iks
) = &iksvt
;