ReactOS 0.4.16-dev-329-g9223134
propset.c
Go to the documentation of this file.
1/* DirectSound
2 *
3 * Copyright 1998 Marcus Meissner
4 * Copyright 1998 Rob Riggs
5 * Copyright 2000-2002 TransGaming Technologies, Inc.
6 *
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.
11 *
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.
16 *
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include "dsound_private.h"
23
25{
29
31{
32 return CONTAINING_RECORD(iface, IKsPrivatePropertySetImpl, IKsPropertySet_iface);
33}
34
35/*******************************************************************************
36 * IKsPrivatePropertySet
37 */
38
39/* IUnknown methods */
41 LPKSPROPERTYSET iface,
43 LPVOID *ppobj )
44{
46 TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
47
50 *ppobj = iface;
51 IUnknown_AddRef(iface);
52 return S_OK;
53 }
54 *ppobj = NULL;
55 return E_NOINTERFACE;
56}
57
59{
62 TRACE("(%p) ref was %d\n", This, ref - 1);
63 return ref;
64}
65
67{
70 TRACE("(%p) ref was %d\n", This, ref + 1);
71
72 if (!ref) {
74 TRACE("(%p) released\n", This);
75 }
76 return ref;
77}
78
80 LPVOID pPropData,
81 ULONG cbPropData,
82 PULONG pcbReturned )
83{
86 TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
87 pPropData,cbPropData,pcbReturned);
88
89 ppd = pPropData;
90
91 if (!ppd) {
92 WARN("invalid parameter: pPropData\n");
93 return DSERR_INVALIDPARAM;
94 }
95
97 ULONG wod;
98 unsigned int wodn;
99 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
100 wodn = waveOutGetNumDevs();
101 for (wod = 0; wod < wodn; wod++) {
102 WAVEOUTCAPSW capsW;
104 res = waveOutGetDevCapsW(wod, &capsW, sizeof(capsW));
105 if (res == MMSYSERR_NOERROR) {
106 if (lstrcmpW(capsW.szPname, ppd->DeviceName) == 0) {
108 hr = DS_OK;
109 TRACE("found %s for %s\n", debugstr_guid(&ppd->DeviceId),
110 debugstr_w(ppd->DeviceName));
111 break;
112 }
113 }
114 }
115 } else if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE) {
116 ULONG wid;
117 unsigned int widn;
118 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
119 widn = waveInGetNumDevs();
120 for (wid = 0; wid < widn; wid++) {
121 WAVEINCAPSW capsW;
123 res = waveInGetDevCapsW(wid, &capsW, sizeof(capsW));
124 if (res == MMSYSERR_NOERROR) {
125 if (lstrcmpW(capsW.szPname, ppd->DeviceName) == 0) {
126 ppd->DeviceId = DSOUND_capture_guids[wid];
127 hr = DS_OK;
128 TRACE("found %s for %s\n", debugstr_guid(&ppd->DeviceId),
129 debugstr_w(ppd->DeviceName));
130 break;
131 }
132 }
133 }
134 }
135
136 if (pcbReturned)
137 *pcbReturned = cbPropData;
138
139 return hr;
140}
141
143 LPVOID pPropData,
144 ULONG cbPropData,
145 PULONG pcbReturned )
146{
149 DWORD len;
150 HRESULT hr;
151
152 TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
153 pPropData,cbPropData,pcbReturned);
154
155 if (!ppd || !ppd->DeviceName) {
156 WARN("invalid parameter: ppd=%p\n", ppd);
157 return DSERR_INVALIDPARAM;
158 }
159
160 data.DataFlow = ppd->DataFlow;
161 len = MultiByteToWideChar(CP_ACP, 0, ppd->DeviceName, -1, NULL, 0);
162 data.DeviceName = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
163 if (!data.DeviceName)
164 return E_OUTOFMEMORY;
165 MultiByteToWideChar(CP_ACP, 0, ppd->DeviceName, -1, data.DeviceName, len);
166
167 hr = DSPROPERTY_WaveDeviceMappingW(&data, cbPropData, pcbReturned);
168 HeapFree(GetProcessHeap(), 0, data.DeviceName);
169 ppd->DeviceId = data.DeviceId;
170
171 if (pcbReturned)
172 *pcbReturned = cbPropData;
173
174 return hr;
175}
176
178 LPVOID pPropData,
179 ULONG cbPropData,
180 PULONG pcbReturned )
181{
183 HRESULT err;
184 GUID dev_guid;
185 ULONG wod, wid, wodn, widn;
187
188 TRACE("pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
189 pPropData,cbPropData,pcbReturned);
190
191 TRACE("DeviceId=%s\n",debugstr_guid(&ppd->DeviceId));
192 if ( IsEqualGUID( &ppd->DeviceId , &GUID_NULL) ) {
193 /* default device of type specified by ppd->DataFlow */
195 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
196 ppd->DeviceId = DSDEVID_DefaultCapture;
197 } else if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER) {
198 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
199 ppd->DeviceId = DSDEVID_DefaultPlayback;
200 } else {
201 WARN("DataFlow=Unknown(%d)\n", ppd->DataFlow);
203 }
204 }
205
207
208 GetDeviceID(&ppd->DeviceId, &dev_guid);
209
210 wodn = waveOutGetNumDevs();
211 widn = waveInGetNumDevs();
212 wid = wod = dev_guid.Data4[7];
213 if (!memcmp(&dev_guid, &DSOUND_renderer_guids[0], sizeof(GUID)-1)
214 && wod < wodn)
215 {
217 ppd->WaveDeviceId = wod;
218 }
219 else if (!memcmp(&dev_guid, &DSOUND_capture_guids[0], sizeof(GUID)-1)
220 && wid < widn)
221 {
223 ppd->WaveDeviceId = wid;
224 }
225 else
226 {
227 WARN("Device not found\n");
229 }
230
232 err = waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,ds_hw_accel);
233 else
234 err = waveInMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,ds_hw_accel);
235
236 if (err != MMSYSERR_NOERROR)
237 {
238 WARN("waveMessage(DRV_QUERYDSOUNDDESC) failed!\n");
240 }
241 else
242 {
243 /* FIXME: Still a memory leak.. */
244 int desclen, modlen;
245 static WCHAR wInterface[] = { 'I','n','t','e','r','f','a','c','e',0 };
246
247 modlen = MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, NULL, 0 );
248 desclen = MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, NULL, 0 );
249 ppd->Module = HeapAlloc(GetProcessHeap(),0,modlen*sizeof(WCHAR));
250 ppd->Description = HeapAlloc(GetProcessHeap(),0,desclen*sizeof(WCHAR));
251 ppd->Interface = wInterface;
252 if (!ppd->Description || !ppd->Module)
253 {
254 WARN("Out of memory\n");
256 HeapFree(GetProcessHeap(), 0, ppd->Module);
257 ppd->Description = ppd->Module = NULL;
258 return E_OUTOFMEMORY;
259 }
260
261 MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->Module, modlen );
262 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->Description, desclen );
263 }
264
266
267 if (pcbReturned) {
268 *pcbReturned = sizeof(*ppd);
269 TRACE("*pcbReturned=%d\n", *pcbReturned);
270 }
271
272 return S_OK;
273}
274
276 LPVOID pPropData,
277 ULONG cbPropData,
278 PULONG pcbReturned )
279{
282 BOOL ret;
283 int widn, wodn, i;
284 TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
285 pPropData,cbPropData,pcbReturned);
286
287 if (pcbReturned)
288 *pcbReturned = 0;
289
290 if (!ppd || !ppd->Callback)
291 {
292 WARN("Invalid ppd %p\n", ppd);
294 }
295
296 wodn = waveOutGetNumDevs();
297 widn = waveInGetNumDevs();
298
299 data.DeviceId = DSOUND_renderer_guids[0];
300 for (i = 0; i < wodn; ++i)
301 {
302 HRESULT hr;
303 data.DeviceId.Data4[7] = i;
305 if (FAILED(hr))
306 {
307 ERR("DescriptionW failed!\n");
308 return S_OK;
309 }
310 ret = ppd->Callback(&data, ppd->Context);
311 HeapFree(GetProcessHeap(), 0, data.Module);
312 HeapFree(GetProcessHeap(), 0, data.Description);
313 if (!ret)
314 return S_OK;
315 }
316
317 data.DeviceId = DSOUND_capture_guids[0];
318 for (i = 0; i < widn; ++i)
319 {
320 HRESULT hr;
321 data.DeviceId.Data4[7] = i;
323 if (FAILED(hr))
324 {
325 ERR("DescriptionW failed!\n");
326 return S_OK;
327 }
328 ret = ppd->Callback(&data, ppd->Context);
329 HeapFree(GetProcessHeap(), 0, data.Module);
330 HeapFree(GetProcessHeap(), 0, data.Description);
331 if (!ret)
332 return S_OK;
333 }
334 return S_OK;
335}
336
339{
340 DWORD modlen, desclen;
341 static char Interface[] = "Interface";
342
343 modlen = WideCharToMultiByte(CP_ACP, 0, dataW->Module, -1, NULL, 0, NULL, NULL);
344 desclen = WideCharToMultiByte(CP_ACP, 0, dataW->Description, -1, NULL, 0, NULL, NULL);
345 dataA->Type = dataW->Type;
346 dataA->DataFlow = dataW->DataFlow;
347 dataA->DeviceId = dataW->DeviceId;
348 dataA->WaveDeviceId = dataW->WaveDeviceId;
349 dataA->Interface = Interface;
350 dataA->Module = HeapAlloc(GetProcessHeap(), 0, modlen);
351 dataA->Description = HeapAlloc(GetProcessHeap(), 0, desclen);
352 if (!dataA->Module || !dataA->Description)
353 {
354 HeapFree(GetProcessHeap(), 0, dataA->Module);
355 HeapFree(GetProcessHeap(), 0, dataA->Description);
356 dataA->Module = dataA->Description = NULL;
357 return FALSE;
358 }
359
360 WideCharToMultiByte(CP_ACP, 0, dataW->Module, -1, dataA->Module, modlen, NULL, NULL);
361 WideCharToMultiByte(CP_ACP, 0, dataW->Description, -1, dataA->Description, desclen, NULL, NULL);
362 return TRUE;
363}
364
367{
368 data1->DeviceId = dataW->DeviceId;
369 lstrcpynW(data1->ModuleW, dataW->Module, sizeof(data1->ModuleW)/sizeof(*data1->ModuleW));
370 lstrcpynW(data1->DescriptionW, dataW->Description, sizeof(data1->DescriptionW)/sizeof(*data1->DescriptionW));
371 WideCharToMultiByte(CP_ACP, 0, data1->DescriptionW, -1, data1->DescriptionA, sizeof(data1->DescriptionA)-1, NULL, NULL);
372 WideCharToMultiByte(CP_ACP, 0, data1->ModuleW, -1, data1->ModuleA, sizeof(data1->ModuleA)-1, NULL, NULL);
373 data1->DescriptionA[sizeof(data1->DescriptionA)-1] = 0;
374 data1->ModuleA[sizeof(data1->ModuleA)-1] = 0;
375 data1->Type = dataW->Type;
376 data1->DataFlow = dataW->DataFlow;
377 data1->WaveDeviceId = data1->Devnode = dataW->WaveDeviceId;
378}
379
381{
384 BOOL ret;
385
386 ret = DSPROPERTY_descWtoA(descW, &descA);
387 if (!ret)
388 return FALSE;
389 ret = ppd->Callback(&descA, ppd->Context);
390 HeapFree(GetProcessHeap(), 0, descA.Module);
392 return ret;
393}
394
396 LPVOID pPropData,
397 ULONG cbPropData,
398 PULONG pcbReturned)
399{
402
403 if (!ppd || !ppd->Callback)
404 {
405 WARN("Invalid ppd %p\n", ppd);
407 }
408
409 data.Callback = DSPROPERTY_enumWtoA;
410 data.Context = ppd;
411
412 return DSPROPERTY_EnumerateW(&data, cbPropData, pcbReturned);
413}
414
416{
419 BOOL ret;
420
421 DSPROPERTY_descWto1(descW, &desc1);
422 ret = ppd->Callback(&desc1, ppd->Context);
423 return ret;
424}
425
427 LPVOID pPropData,
428 ULONG cbPropData,
429 PULONG pcbReturned)
430{
433
434 if (!ppd || !ppd->Callback)
435 {
436 WARN("Invalid ppd %p\n", ppd);
438 }
439
440 data.Callback = DSPROPERTY_enumWto1;
441 data.Context = ppd;
442
443 return DSPROPERTY_EnumerateW(&data, cbPropData, pcbReturned);
444}
445
447 LPVOID pPropData,
448 ULONG cbPropData,
449 PULONG pcbReturned)
450{
453 HRESULT hr;
454
455 if (pcbReturned)
456 *pcbReturned = sizeof(*ppd);
457 if (!pPropData)
458 return S_OK;
459
460 data.DeviceId = ppd->DeviceId;
461 data.DataFlow = ppd->DataFlow;
463 if (FAILED(hr))
464 return hr;
465 if (!DSPROPERTY_descWtoA(&data, ppd))
467 HeapFree(GetProcessHeap(), 0, data.Module);
468 HeapFree(GetProcessHeap(), 0, data.Interface);
469 return hr;
470}
471
473 LPVOID pPropData,
474 ULONG cbPropData,
475 PULONG pcbReturned)
476{
479 HRESULT hr;
480
481 if (pcbReturned)
482 *pcbReturned = sizeof(*ppd);
483 if (!pPropData)
484 return S_OK;
485
486 data.DeviceId = ppd->DeviceId;
487 data.DataFlow = ppd->DataFlow;
489 if (FAILED(hr))
490 return hr;
492 HeapFree(GetProcessHeap(), 0, data.Module);
493 HeapFree(GetProcessHeap(), 0, data.Interface);
494 return hr;
495}
496
498 LPKSPROPERTYSET iface,
499 REFGUID guidPropSet,
500 ULONG dwPropID,
501 LPVOID pInstanceData,
502 ULONG cbInstanceData,
503 LPVOID pPropData,
504 ULONG cbPropData,
505 PULONG pcbReturned )
506{
508 TRACE("(iface=%p,guidPropSet=%s,dwPropID=%d,pInstanceData=%p,cbInstanceData=%d,pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
509 This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned);
510
511 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
512 switch (dwPropID) {
514 return DSPROPERTY_WaveDeviceMappingA(pPropData,cbPropData,pcbReturned);
516 return DSPROPERTY_Description1(pPropData,cbPropData,pcbReturned);
518 return DSPROPERTY_Enumerate1(pPropData,cbPropData,pcbReturned);
520 return DSPROPERTY_WaveDeviceMappingW(pPropData,cbPropData,pcbReturned);
522 return DSPROPERTY_DescriptionA(pPropData,cbPropData,pcbReturned);
524 return DSPROPERTY_DescriptionW(pPropData,cbPropData,pcbReturned);
526 return DSPROPERTY_EnumerateA(pPropData,cbPropData,pcbReturned);
528 return DSPROPERTY_EnumerateW(pPropData,cbPropData,pcbReturned);
529 default:
530 FIXME("unsupported ID: %d\n",dwPropID);
531 break;
532 }
533 } else {
534 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet));
535 }
536
537 if (pcbReturned) {
538 *pcbReturned = 0;
539 FIXME("*pcbReturned=%d\n", *pcbReturned);
540 }
541
543}
544
546 LPKSPROPERTYSET iface,
547 REFGUID guidPropSet,
548 ULONG dwPropID,
549 LPVOID pInstanceData,
550 ULONG cbInstanceData,
551 LPVOID pPropData,
552 ULONG cbPropData )
553{
555
556 FIXME("(%p,%s,%d,%p,%d,%p,%d), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
558}
559
561 LPKSPROPERTYSET iface,
562 REFGUID guidPropSet,
563 ULONG dwPropID,
564 PULONG pTypeSupport )
565{
567 TRACE("(%p,%s,%d,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
568
569 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
570 switch (dwPropID) {
572 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
573 return S_OK;
575 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
576 return S_OK;
578 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
579 return S_OK;
581 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
582 return S_OK;
584 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
585 return S_OK;
587 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
588 return S_OK;
590 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
591 return S_OK;
593 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
594 return S_OK;
595 default:
596 FIXME("unsupported ID: %d\n",dwPropID);
597 break;
598 }
599 } else {
600 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet));
601 }
602
604}
605
606static const IKsPropertySetVtbl ikspvt = {
613};
614
616 REFIID riid,
617 IKsPropertySet **piks)
618{
620 TRACE("(%s, %p)\n", debugstr_guid(riid), piks);
621
622 if (!IsEqualIID(riid, &IID_IUnknown) &&
624 *piks = 0;
625 return E_NOINTERFACE;
626 }
627
628 iks = HeapAlloc(GetProcessHeap(),0,sizeof(*iks));
629 iks->ref = 1;
630 iks->IKsPropertySet_iface.lpVtbl = &ikspvt;
631
632 *piks = &iks->IKsPropertySet_iface;
633 return S_OK;
634}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define UlongToHandle(ul)
Definition: basetsd.h:97
const GUID IID_IUnknown
const GUID IID_IKsPropertySet
Definition: controlnode.cpp:13
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
Definition: dsound.c:53
static const IKsPropertySetVtbl ikspvt
Definition: propset.c:606
static IKsPrivatePropertySetImpl * impl_from_IKsPropertySet(IKsPropertySet *iface)
Definition: propset.c:30
static HRESULT DSPROPERTY_WaveDeviceMappingW(LPVOID pPropData, ULONG cbPropData, PULONG pcbReturned)
Definition: propset.c:79
static HRESULT WINAPI IKsPrivatePropertySetImpl_Set(LPKSPROPERTYSET iface, REFGUID guidPropSet, ULONG dwPropID, LPVOID pInstanceData, ULONG cbInstanceData, LPVOID pPropData, ULONG cbPropData)
Definition: propset.c:545
static ULONG WINAPI IKsPrivatePropertySetImpl_AddRef(LPKSPROPERTYSET iface)
Definition: propset.c:58
static HRESULT DSPROPERTY_EnumerateA(LPVOID pPropData, ULONG cbPropData, PULONG pcbReturned)
Definition: propset.c:395
static BOOL CALLBACK DSPROPERTY_enumWto1(DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA *descW, void *data)
Definition: propset.c:415
static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport(LPKSPROPERTYSET iface, REFGUID guidPropSet, ULONG dwPropID, PULONG pTypeSupport)
Definition: propset.c:560
static HRESULT DSPROPERTY_DescriptionA(LPVOID pPropData, ULONG cbPropData, PULONG pcbReturned)
Definition: propset.c:446
static BOOL CALLBACK DSPROPERTY_enumWtoA(DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA *descW, void *data)
Definition: propset.c:380
static HRESULT DSPROPERTY_DescriptionW(LPVOID pPropData, ULONG cbPropData, PULONG pcbReturned)
Definition: propset.c:177
static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface)
Definition: propset.c:66
static HRESULT DSPROPERTY_WaveDeviceMappingA(LPVOID pPropData, ULONG cbPropData, PULONG pcbReturned)
Definition: propset.c:142
static HRESULT DSPROPERTY_Enumerate1(LPVOID pPropData, ULONG cbPropData, PULONG pcbReturned)
Definition: propset.c:426
HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, IKsPropertySet **piks)
Definition: propset.c:615
static HRESULT DSPROPERTY_EnumerateW(LPVOID pPropData, ULONG cbPropData, PULONG pcbReturned)
Definition: propset.c:275
static HRESULT WINAPI IKsPrivatePropertySetImpl_QueryInterface(LPKSPROPERTYSET iface, REFIID riid, LPVOID *ppobj)
Definition: propset.c:40
static BOOL DSPROPERTY_descWtoA(const DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA *dataW, DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA *dataA)
Definition: propset.c:337
static HRESULT WINAPI IKsPrivatePropertySetImpl_Get(LPKSPROPERTYSET iface, REFGUID guidPropSet, ULONG dwPropID, LPVOID pInstanceData, ULONG cbInstanceData, LPVOID pPropData, ULONG cbPropData, PULONG pcbReturned)
Definition: propset.c:497
static HRESULT DSPROPERTY_Description1(LPVOID pPropData, ULONG cbPropData, PULONG pcbReturned)
Definition: propset.c:472
static void DSPROPERTY_descWto1(const DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA *dataW, DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA *data1)
Definition: propset.c:365
#define GetProcessHeap()
Definition: compat.h:736
#define CP_ACP
Definition: compat.h:109
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
#define lstrcpynW
Definition: compat.h:738
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4243
@ DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1
Definition: dsconf.h:18
@ DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A
Definition: dsconf.h:21
@ DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W
Definition: dsconf.h:20
@ DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1
Definition: dsconf.h:19
@ DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W
Definition: dsconf.h:24
@ DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A
Definition: dsconf.h:17
@ DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W
Definition: dsconf.h:22
@ DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A
Definition: dsconf.h:23
@ DIRECTSOUNDDEVICE_TYPE_VXD
Definition: dsconf.h:30
@ DIRECTSOUNDDEVICE_DATAFLOW_RENDER
Definition: dsconf.h:36
@ DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE
Definition: dsconf.h:37
#define KSPROPERTY_SUPPORT_GET
Definition: dsound.h:1129
#define DS_OK
Definition: dsound.h:116
#define DSERR_INVALIDPARAM
Definition: dsound.h:121
GUID DSOUND_renderer_guids[MAXWAVEDRIVERS]
Definition: dsound_main.c:41
GUID DSOUND_capture_guids[MAXWAVEDRIVERS]
Definition: dsound_main.c:42
int ds_hw_accel
Definition: dsound_main.c:78
void setup_dsound_options(void)
Definition: dsound_main.c:102
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint res
Definition: glext.h:9613
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define GUID_NULL
Definition: ks.h:106
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
static const WCHAR desc[]
Definition: protectdata.c:36
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define err(...)
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
IKsPropertySet IKsPropertySet_iface
Definition: propset.c:26
DIRECTSOUNDDEVICE_DATAFLOW DataFlow
Definition: dsconf.h:62
DIRECTSOUNDDEVICE_DATAFLOW DataFlow
Definition: dsconf.h:70
DIRECTSOUNDDEVICE_DATAFLOW DataFlow
Definition: dsconf.h:81
LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1 Callback
Definition: dsconf.h:135
LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA Callback
Definition: dsconf.h:141
LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW Callback
Definition: dsconf.h:147
Definition: scsiwmi.h:51
Definition: tftpd.h:126
Definition: send.c:48
WCHAR szPname[MAXPNAMELEN]
Definition: mmsystem.h:1060
WCHAR szPname[MAXPNAMELEN]
Definition: mmsystem.h:1039
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
int ret
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
UINT WINAPI waveOutGetNumDevs(void)
Definition: winmm.c:2137
UINT WINAPI waveOutGetDevCapsW(UINT_PTR uDeviceID, LPWAVEOUTCAPSW lpCaps, UINT uSize)
Definition: winmm.c:2173
UINT WINAPI waveInGetNumDevs(void)
Definition: winmm.c:2565
UINT WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
Definition: winmm.c:2813
UINT WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
Definition: winmm.c:2538
UINT WINAPI waveInGetDevCapsW(UINT_PTR uDeviceID, LPWAVEINCAPSW lpCaps, UINT uSize)
Definition: winmm.c:2573
__wchar_t WCHAR
Definition: xmlstorage.h:180