dsound: Clean up some unused variables.
[wine/dibdrv.git] / dlls / dsound / dsound_main.c
blob791dd3075eb97e2831f2d2ae4be83530a56ea385
1 /* DirectSound
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 * Most thread locking is complete. There may be a few race
23 * conditions still lurking.
25 * Tested with a Soundblaster clone, a Gravis UltraSound Classic,
26 * and a Turtle Beach Tropez+.
28 * TODO:
29 * Implement SetCooperativeLevel properly (need to address focus issues)
30 * Implement DirectSound3DBuffers (stubs in place)
31 * Use hardware 3D support if available
32 * Add critical section locking inside Release and AddRef methods
33 * Handle static buffers - put those in hardware, non-static not in hardware
34 * Hardware DuplicateSoundBuffer
35 * Proper volume calculation, and setting volume in HEL primary buffer
36 * Optimize WINMM and negotiate fragment size, decrease DS_HEL_MARGIN
39 #include <stdarg.h>
41 #define COBJMACROS
42 #define NONAMELESSSTRUCT
43 #define NONAMELESSUNION
44 #include "windef.h"
45 #include "winbase.h"
46 #include "winuser.h"
47 #include "winnls.h"
48 #include "winreg.h"
49 #include "mmsystem.h"
50 #include "winternl.h"
51 #include "mmddk.h"
52 #include "wine/debug.h"
53 #include "dsound.h"
54 #include "dsdriver.h"
55 #include "dsound_private.h"
56 #include "dsconf.h"
58 WINE_DEFAULT_DEBUG_CHANNEL(dsound);
60 /* these are eligible for tuning... they must be high on slow machines... */
61 /* some stuff may get more responsive with lower values though... */
62 #define DS_EMULDRIVER 0 /* some games (Quake 2, UT) refuse to accept
63 emulated dsound devices. set to 0 ! */
64 #define DS_SND_QUEUE_MAX 10 /* max number of fragments to prebuffer */
66 DirectSoundDevice* DSOUND_renderer[MAXWAVEDRIVERS];
67 GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];
68 GUID DSOUND_capture_guids[MAXWAVEDRIVERS];
70 HRESULT mmErr(UINT err)
72 switch(err) {
73 case MMSYSERR_NOERROR:
74 return DS_OK;
75 case MMSYSERR_ALLOCATED:
76 return DSERR_ALLOCATED;
77 case MMSYSERR_ERROR:
78 case MMSYSERR_INVALHANDLE:
79 case WAVERR_STILLPLAYING:
80 return DSERR_GENERIC; /* FIXME */
81 case MMSYSERR_NODRIVER:
82 return DSERR_NODRIVER;
83 case MMSYSERR_NOMEM:
84 return DSERR_OUTOFMEMORY;
85 case MMSYSERR_INVALPARAM:
86 case WAVERR_BADFORMAT:
87 case WAVERR_UNPREPARED:
88 return DSERR_INVALIDPARAM;
89 case MMSYSERR_NOTSUPPORTED:
90 return DSERR_UNSUPPORTED;
91 default:
92 FIXME("Unknown MMSYS error %d\n",err);
93 return DSERR_GENERIC;
97 int ds_emuldriver = DS_EMULDRIVER;
98 int ds_snd_queue_max = DS_SND_QUEUE_MAX;
99 int ds_hw_accel = DS_HW_ACCEL_FULL;
100 int ds_default_playback = 0;
101 int ds_default_capture = 0;
102 int ds_default_sample_rate = 22050;
103 int ds_default_bits_per_sample = 8;
106 * Get a config key from either the app-specific or the default config
109 static inline DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name,
110 char *buffer, DWORD size )
112 if (appkey && !RegQueryValueExA( appkey, name, 0, NULL, (LPBYTE)buffer, &size )) return 0;
113 if (defkey && !RegQueryValueExA( defkey, name, 0, NULL, (LPBYTE)buffer, &size )) return 0;
114 return ERROR_FILE_NOT_FOUND;
119 * Setup the dsound options.
122 void setup_dsound_options(void)
124 char buffer[MAX_PATH+16];
125 HKEY hkey, appkey = 0;
126 DWORD len;
128 buffer[MAX_PATH]='\0';
130 /* @@ Wine registry key: HKCU\Software\Wine\DirectSound */
131 if (RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\DirectSound", &hkey )) hkey = 0;
133 len = GetModuleFileNameA( 0, buffer, MAX_PATH );
134 if (len && len < MAX_PATH)
136 HKEY tmpkey;
137 /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\DirectSound */
138 if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\AppDefaults", &tmpkey ))
140 char *p, *appname = buffer;
141 if ((p = strrchr( appname, '/' ))) appname = p + 1;
142 if ((p = strrchr( appname, '\\' ))) appname = p + 1;
143 strcat( appname, "\\DirectSound" );
144 TRACE("appname = [%s]\n", appname);
145 if (RegOpenKeyA( tmpkey, appname, &appkey )) appkey = 0;
146 RegCloseKey( tmpkey );
150 /* get options */
152 if (!get_config_key( hkey, appkey, "EmulDriver", buffer, MAX_PATH ))
153 ds_emuldriver = strcmp(buffer, "N");
155 if (!get_config_key( hkey, appkey, "SndQueueMax", buffer, MAX_PATH ))
156 ds_snd_queue_max = atoi(buffer);
158 if (!get_config_key( hkey, appkey, "HardwareAcceleration", buffer, MAX_PATH )) {
159 if (strcmp(buffer, "Full") == 0)
160 ds_hw_accel = DS_HW_ACCEL_FULL;
161 else if (strcmp(buffer, "Standard") == 0)
162 ds_hw_accel = DS_HW_ACCEL_STANDARD;
163 else if (strcmp(buffer, "Basic") == 0)
164 ds_hw_accel = DS_HW_ACCEL_BASIC;
165 else if (strcmp(buffer, "Emulation") == 0)
166 ds_hw_accel = DS_HW_ACCEL_EMULATION;
169 if (!get_config_key( hkey, appkey, "DefaultPlayback", buffer, MAX_PATH ))
170 ds_default_playback = atoi(buffer);
172 if (!get_config_key( hkey, appkey, "DefaultCapture", buffer, MAX_PATH ))
173 ds_default_capture = atoi(buffer);
175 if (!get_config_key( hkey, appkey, "DefaultSampleRate", buffer, MAX_PATH ))
176 ds_default_sample_rate = atoi(buffer);
178 if (!get_config_key( hkey, appkey, "DefaultBitsPerSample", buffer, MAX_PATH ))
179 ds_default_bits_per_sample = atoi(buffer);
181 if (appkey) RegCloseKey( appkey );
182 if (hkey) RegCloseKey( hkey );
184 if (ds_emuldriver != DS_EMULDRIVER )
185 WARN("ds_emuldriver = %d (default=%d)\n",ds_emuldriver, DS_EMULDRIVER);
186 if (ds_snd_queue_max != DS_SND_QUEUE_MAX)
187 WARN("ds_snd_queue_max = %d (default=%d)\n",ds_snd_queue_max ,DS_SND_QUEUE_MAX);
188 if (ds_hw_accel != DS_HW_ACCEL_FULL)
189 WARN("ds_hw_accel = %s (default=Full)\n",
190 ds_hw_accel==DS_HW_ACCEL_FULL ? "Full" :
191 ds_hw_accel==DS_HW_ACCEL_STANDARD ? "Standard" :
192 ds_hw_accel==DS_HW_ACCEL_BASIC ? "Basic" :
193 ds_hw_accel==DS_HW_ACCEL_EMULATION ? "Emulation" :
194 "Unknown");
195 if (ds_default_playback != 0)
196 WARN("ds_default_playback = %d (default=0)\n",ds_default_playback);
197 if (ds_default_capture != 0)
198 WARN("ds_default_capture = %d (default=0)\n",ds_default_playback);
199 if (ds_default_sample_rate != 22050)
200 WARN("ds_default_sample_rate = %d (default=22050)\n",ds_default_sample_rate);
201 if (ds_default_bits_per_sample != 8)
202 WARN("ds_default_bits_per_sample = %d (default=8)\n",ds_default_bits_per_sample);
205 static const char * get_device_id(LPCGUID pGuid)
207 if (IsEqualGUID(&DSDEVID_DefaultPlayback, pGuid))
208 return "DSDEVID_DefaultPlayback";
209 else if (IsEqualGUID(&DSDEVID_DefaultVoicePlayback, pGuid))
210 return "DSDEVID_DefaultVoicePlayback";
211 else if (IsEqualGUID(&DSDEVID_DefaultCapture, pGuid))
212 return "DSDEVID_DefaultCapture";
213 else if (IsEqualGUID(&DSDEVID_DefaultVoiceCapture, pGuid))
214 return "DSDEVID_DefaultVoiceCapture";
215 return debugstr_guid(pGuid);
218 /***************************************************************************
219 * GetDeviceID [DSOUND.9]
221 * Retrieves unique identifier of default device specified
223 * PARAMS
224 * pGuidSrc [I] Address of device GUID.
225 * pGuidDest [O] Address to receive unique device GUID.
227 * RETURNS
228 * Success: DS_OK
229 * Failure: DSERR_INVALIDPARAM
231 * NOTES
232 * pGuidSrc is a valid device GUID or DSDEVID_DefaultPlayback,
233 * DSDEVID_DefaultCapture, DSDEVID_DefaultVoicePlayback, or
234 * DSDEVID_DefaultVoiceCapture.
235 * Returns pGuidSrc if pGuidSrc is a valid device or the device
236 * GUID for the specified constants.
238 HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
240 TRACE("(%s,%p)\n", get_device_id(pGuidSrc),pGuidDest);
242 if ( pGuidSrc == NULL) {
243 WARN("invalid parameter: pGuidSrc == NULL\n");
244 return DSERR_INVALIDPARAM;
247 if ( pGuidDest == NULL ) {
248 WARN("invalid parameter: pGuidDest == NULL\n");
249 return DSERR_INVALIDPARAM;
252 if ( IsEqualGUID( &DSDEVID_DefaultPlayback, pGuidSrc ) ||
253 IsEqualGUID( &DSDEVID_DefaultVoicePlayback, pGuidSrc ) ) {
254 CopyMemory(pGuidDest, &DSOUND_renderer_guids[ds_default_playback], sizeof(GUID));
255 TRACE("returns %s\n", get_device_id(pGuidDest));
256 return DS_OK;
259 if ( IsEqualGUID( &DSDEVID_DefaultCapture, pGuidSrc ) ||
260 IsEqualGUID( &DSDEVID_DefaultVoiceCapture, pGuidSrc ) ) {
261 CopyMemory(pGuidDest, &DSOUND_capture_guids[ds_default_capture], sizeof(GUID));
262 TRACE("returns %s\n", get_device_id(pGuidDest));
263 return DS_OK;
266 CopyMemory(pGuidDest, pGuidSrc, sizeof(GUID));
267 TRACE("returns %s\n", get_device_id(pGuidDest));
269 return DS_OK;
273 /***************************************************************************
274 * DirectSoundEnumerateA [DSOUND.2]
276 * Enumerate all DirectSound drivers installed in the system
278 * PARAMS
279 * lpDSEnumCallback [I] Address of callback function.
280 * lpContext [I] Address of user defined context passed to callback function.
282 * RETURNS
283 * Success: DS_OK
284 * Failure: DSERR_INVALIDPARAM
286 HRESULT WINAPI DirectSoundEnumerateA(
287 LPDSENUMCALLBACKA lpDSEnumCallback,
288 LPVOID lpContext)
290 unsigned devs, wod;
291 DSDRIVERDESC desc;
292 GUID guid;
293 int err;
295 TRACE("lpDSEnumCallback = %p, lpContext = %p\n",
296 lpDSEnumCallback, lpContext);
298 if (lpDSEnumCallback == NULL) {
299 WARN("invalid parameter: lpDSEnumCallback == NULL\n");
300 return DSERR_INVALIDPARAM;
303 devs = waveOutGetNumDevs();
304 if (devs > 0) {
305 if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
306 for (wod = 0; wod < devs; ++wod) {
307 if (IsEqualGUID( &guid, &DSOUND_renderer_guids[wod]) ) {
308 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
309 if (err == DS_OK) {
310 TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
311 "Primary Sound Driver",desc.szDrvname,lpContext);
312 if (lpDSEnumCallback(NULL, "Primary Sound Driver", desc.szDrvname, lpContext) == FALSE)
313 return DS_OK;
320 for (wod = 0; wod < devs; ++wod) {
321 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
322 if (err == DS_OK) {
323 TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
324 debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
325 if (lpDSEnumCallback(&DSOUND_renderer_guids[wod], desc.szDesc, desc.szDrvname, lpContext) == FALSE)
326 return DS_OK;
329 return DS_OK;
332 /***************************************************************************
333 * DirectSoundEnumerateW [DSOUND.3]
335 * Enumerate all DirectSound drivers installed in the system
337 * PARAMS
338 * lpDSEnumCallback [I] Address of callback function.
339 * lpContext [I] Address of user defined context passed to callback function.
341 * RETURNS
342 * Success: DS_OK
343 * Failure: DSERR_INVALIDPARAM
345 HRESULT WINAPI DirectSoundEnumerateW(
346 LPDSENUMCALLBACKW lpDSEnumCallback,
347 LPVOID lpContext )
349 unsigned devs, wod;
350 DSDRIVERDESC desc;
351 GUID guid;
352 int err;
353 WCHAR wDesc[MAXPNAMELEN];
354 WCHAR wName[MAXPNAMELEN];
356 TRACE("lpDSEnumCallback = %p, lpContext = %p\n",
357 lpDSEnumCallback, lpContext);
359 if (lpDSEnumCallback == NULL) {
360 WARN("invalid parameter: lpDSEnumCallback == NULL\n");
361 return DSERR_INVALIDPARAM;
364 devs = waveOutGetNumDevs();
365 if (devs > 0) {
366 if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
367 for (wod = 0; wod < devs; ++wod) {
368 if (IsEqualGUID( &guid, &DSOUND_renderer_guids[wod] ) ) {
369 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
370 if (err == DS_OK) {
371 TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
372 "Primary Sound Driver",desc.szDrvname,lpContext);
373 MultiByteToWideChar( CP_ACP, 0, "Primary Sound Driver", -1,
374 wDesc, sizeof(wDesc)/sizeof(WCHAR) );
375 MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
376 wName, sizeof(wName)/sizeof(WCHAR) );
377 if (lpDSEnumCallback(NULL, wDesc, wName, lpContext) == FALSE)
378 return DS_OK;
385 for (wod = 0; wod < devs; ++wod) {
386 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
387 if (err == DS_OK) {
388 TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
389 debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
390 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1,
391 wDesc, sizeof(wDesc)/sizeof(WCHAR) );
392 MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
393 wName, sizeof(wName)/sizeof(WCHAR) );
394 if (lpDSEnumCallback(&DSOUND_renderer_guids[wod], wDesc, wName, lpContext) == FALSE)
395 return DS_OK;
398 return DS_OK;
401 /*******************************************************************************
402 * DirectSound ClassFactory
405 typedef HRESULT (*FnCreateInstance)(REFIID riid, LPVOID *ppobj);
407 typedef struct {
408 const IClassFactoryVtbl *lpVtbl;
409 LONG ref;
410 REFCLSID rclsid;
411 FnCreateInstance pfnCreateInstance;
412 } IClassFactoryImpl;
414 static HRESULT WINAPI
415 DSCF_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppobj)
417 IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
418 TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
419 if (ppobj == NULL)
420 return E_POINTER;
421 if (IsEqualIID(riid, &IID_IUnknown) ||
422 IsEqualIID(riid, &IID_IClassFactory))
424 *ppobj = iface;
425 IUnknown_AddRef(iface);
426 return S_OK;
428 *ppobj = NULL;
429 return E_NOINTERFACE;
432 static ULONG WINAPI DSCF_AddRef(LPCLASSFACTORY iface)
434 IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
435 ULONG ref = InterlockedIncrement(&(This->ref));
436 TRACE("(%p) ref was %d\n", This, ref - 1);
437 return ref;
440 static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface)
442 IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
443 ULONG ref = InterlockedDecrement(&(This->ref));
444 TRACE("(%p) ref was %d\n", This, ref + 1);
445 /* static class, won't be freed */
446 return ref;
449 static HRESULT WINAPI DSCF_CreateInstance(
450 LPCLASSFACTORY iface,
451 LPUNKNOWN pOuter,
452 REFIID riid,
453 LPVOID *ppobj)
455 IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
456 TRACE("(%p, %p, %s, %p)\n", This, pOuter, debugstr_guid(riid), ppobj);
458 if (pOuter)
459 return CLASS_E_NOAGGREGATION;
461 if (ppobj == NULL) {
462 WARN("invalid parameter\n");
463 return DSERR_INVALIDPARAM;
465 *ppobj = NULL;
466 return This->pfnCreateInstance(riid, ppobj);
469 static HRESULT WINAPI DSCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
471 IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
472 FIXME("(%p, %d) stub!\n", This, dolock);
473 return S_OK;
476 static const IClassFactoryVtbl DSCF_Vtbl = {
477 DSCF_QueryInterface,
478 DSCF_AddRef,
479 DSCF_Release,
480 DSCF_CreateInstance,
481 DSCF_LockServer
484 static IClassFactoryImpl DSOUND_CF[] = {
485 { &DSCF_Vtbl, 1, &CLSID_DirectSound, (FnCreateInstance)DSOUND_Create },
486 { &DSCF_Vtbl, 1, &CLSID_DirectSound8, (FnCreateInstance)DSOUND_Create8 },
487 { &DSCF_Vtbl, 1, &CLSID_DirectSoundCapture, (FnCreateInstance)DSOUND_CaptureCreate },
488 { &DSCF_Vtbl, 1, &CLSID_DirectSoundCapture8, (FnCreateInstance)DSOUND_CaptureCreate8 },
489 { &DSCF_Vtbl, 1, &CLSID_DirectSoundFullDuplex, (FnCreateInstance)DSOUND_FullDuplexCreate },
490 { &DSCF_Vtbl, 1, &CLSID_DirectSoundPrivate, (FnCreateInstance)IKsPrivatePropertySetImpl_Create },
491 { NULL, 0, NULL, NULL }
494 /*******************************************************************************
495 * DllGetClassObject [DSOUND.@]
496 * Retrieves class object from a DLL object
498 * NOTES
499 * Docs say returns STDAPI
501 * PARAMS
502 * rclsid [I] CLSID for the class object
503 * riid [I] Reference to identifier of interface for class object
504 * ppv [O] Address of variable to receive interface pointer for riid
506 * RETURNS
507 * Success: S_OK
508 * Failure: CLASS_E_CLASSNOTAVAILABLE, E_OUTOFMEMORY, E_INVALIDARG,
509 * E_UNEXPECTED
511 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
513 int i = 0;
514 TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
516 if (ppv == NULL) {
517 WARN("invalid parameter\n");
518 return E_INVALIDARG;
521 *ppv = NULL;
523 if (!IsEqualIID(riid, &IID_IClassFactory) &&
524 !IsEqualIID(riid, &IID_IUnknown)) {
525 WARN("no interface for %s\n", debugstr_guid(riid));
526 return E_NOINTERFACE;
529 while (NULL != DSOUND_CF[i].rclsid) {
530 if (IsEqualGUID(rclsid, DSOUND_CF[i].rclsid)) {
531 DSCF_AddRef((IClassFactory*) &DSOUND_CF[i]);
532 *ppv = &DSOUND_CF[i];
533 return S_OK;
535 i++;
538 WARN("(%s, %s, %p): no class found.\n", debugstr_guid(rclsid),
539 debugstr_guid(riid), ppv);
540 return CLASS_E_CLASSNOTAVAILABLE;
544 /*******************************************************************************
545 * DllCanUnloadNow [DSOUND.4]
546 * Determines whether the DLL is in use.
548 * RETURNS
549 * Success: S_OK
550 * Failure: S_FALSE
552 HRESULT WINAPI DllCanUnloadNow(void)
554 FIXME("(void): stub\n");
555 return S_FALSE;
558 #define INIT_GUID(guid, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
559 guid.Data1 = l; guid.Data2 = w1; guid.Data3 = w2; \
560 guid.Data4[0] = b1; guid.Data4[1] = b2; guid.Data4[2] = b3; \
561 guid.Data4[3] = b4; guid.Data4[4] = b5; guid.Data4[5] = b6; \
562 guid.Data4[6] = b7; guid.Data4[7] = b8;
564 /***********************************************************************
565 * DllMain (DSOUND.init)
567 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
569 int i;
570 TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpvReserved);
572 switch (fdwReason) {
573 case DLL_PROCESS_ATTACH:
574 TRACE("DLL_PROCESS_ATTACH\n");
575 for (i = 0; i < MAXWAVEDRIVERS; i++) {
576 DSOUND_renderer[i] = NULL;
577 DSOUND_capture[i] = NULL;
578 INIT_GUID(DSOUND_renderer_guids[i], 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
579 INIT_GUID(DSOUND_capture_guids[i], 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
581 break;
582 case DLL_PROCESS_DETACH:
583 TRACE("DLL_PROCESS_DETACH\n");
584 break;
585 case DLL_THREAD_ATTACH:
586 TRACE("DLL_THREAD_ATTACH\n");
587 break;
588 case DLL_THREAD_DETACH:
589 TRACE("DLL_THREAD_DETACH\n");
590 break;
591 default:
592 TRACE("UNKNOWN REASON\n");
593 break;
595 return TRUE;