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>
30 #include <math.h> /* Insomnia - pow() function */
40 #include "wine/windef16.h"
41 #include "wine/debug.h"
44 #include "dsound_private.h"
46 WINE_DEFAULT_DEBUG_CHANNEL(dsound);
49 /*******************************************************************************
53 /* IUnknown methods */
54 static HRESULT WINAPI IKsPropertySetImpl_QueryInterface(
55 LPKSPROPERTYSET iface, REFIID riid, LPVOID *ppobj
57 ICOM_THIS(IKsPropertySetImpl,iface);
59 TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
60 return IDirectSoundBuffer_QueryInterface((LPDIRECTSOUNDBUFFER8)This->dsb, riid, ppobj);
63 static ULONG WINAPI IKsPropertySetImpl_AddRef(LPKSPROPERTYSET iface) {
64 ICOM_THIS(IKsPropertySetImpl,iface);
67 ulReturn = InterlockedIncrement(&This->ref);
69 IDirectSoundBuffer_AddRef((LPDIRECTSOUND3DBUFFER)This->dsb);
73 static ULONG WINAPI IKsPropertySetImpl_Release(LPKSPROPERTYSET iface) {
74 ICOM_THIS(IKsPropertySetImpl,iface);
77 ulReturn = InterlockedDecrement(&This->ref);
80 IDirectSoundBuffer_Release((LPDIRECTSOUND3DBUFFER)This->dsb);
84 static HRESULT WINAPI IKsPropertySetImpl_Get(LPKSPROPERTYSET iface,
85 REFGUID guidPropSet, ULONG dwPropID,
86 LPVOID pInstanceData, ULONG cbInstanceData,
87 LPVOID pPropData, ULONG cbPropData,
90 ICOM_THIS(IKsPropertySetImpl,iface);
92 FIXME("(%p,%s,%ld,%p,%ld,%p,%ld,%p), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned);
93 return E_PROP_ID_UNSUPPORTED;
96 static HRESULT WINAPI IKsPropertySetImpl_Set(LPKSPROPERTYSET iface,
97 REFGUID guidPropSet, ULONG dwPropID,
98 LPVOID pInstanceData, ULONG cbInstanceData,
99 LPVOID pPropData, ULONG cbPropData
101 ICOM_THIS(IKsPropertySetImpl,iface);
103 FIXME("(%p,%s,%ld,%p,%ld,%p,%ld), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
104 return E_PROP_ID_UNSUPPORTED;
107 static HRESULT WINAPI IKsPropertySetImpl_QuerySupport(LPKSPROPERTYSET iface,
108 REFGUID guidPropSet, ULONG dwPropID, PULONG pTypeSupport
110 ICOM_THIS(IKsPropertySetImpl,iface);
112 FIXME("(%p,%s,%ld,%p), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
113 return E_PROP_ID_UNSUPPORTED;
116 static ICOM_VTABLE(IKsPropertySet) iksvt = {
117 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
118 IKsPropertySetImpl_QueryInterface,
119 IKsPropertySetImpl_AddRef,
120 IKsPropertySetImpl_Release,
121 IKsPropertySetImpl_Get,
122 IKsPropertySetImpl_Set,
123 IKsPropertySetImpl_QuerySupport
126 HRESULT WINAPI IKsPropertySetImpl_Create(
127 IDirectSoundBufferImpl *This,
128 IKsPropertySetImpl **piks)
130 IKsPropertySetImpl *iks;
132 iks = (IKsPropertySetImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*iks));
135 ICOM_VTBL(iks) = &iksvt;