Avoid some casts
[dsound-openal.git] / dsound_private.h
blob2810b121871d6bdddd6459e9c43ce1f99baf129a
1 /* DirectSound
3 * Copyright 1998 Marcus Meissner
4 * Copyright 1998 Rob Riggs
5 * Copyright 2000-2001 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 /* Linux does not support better timing than 10ms */
23 #define DS_TIME_RES 2 /* Resolution of multimedia timer */
24 #define DS_TIME_DEL 10 /* Delay of multimedia timer callback, and duration of HEL fragment */
25 /* Default refresh count, can be overridden */
26 #define FAKE_REFRESH_COUNT (1000/DS_TIME_DEL/2)
29 #ifdef __WINESRC__
31 #ifdef __APPLE__
32 #include <OpenAL/al.h>
33 #include <OpenAL/alc.h>
34 #else
35 #include <AL/al.h>
36 #include <AL/alc.h>
37 #endif
39 #else
41 #include <al.h>
42 #include <alc.h>
44 #include <stdio.h>
46 extern int LogLevel;
48 #ifdef DEBUG_INFO
49 #define TRACE(fmt,args...) do { \
50 if(LogLevel >= 3) \
51 fprintf(stderr, "%04x:trace:dsound:%s " fmt, (UINT)GetCurrentThreadId(), __FUNCTION__, ##args); \
52 } while(0)
53 #define WARN(fmt,args...) do { \
54 if(LogLevel >= 2) \
55 fprintf(stderr, "%04x:warn:dsound:%s " fmt, (UINT)GetCurrentThreadId(), __FUNCTION__, ##args); \
56 } while(0)
57 #define FIXME(fmt,args...) do { \
58 if(LogLevel >= 1) \
59 fprintf(stderr, "%04x:fixme:dsound:%s " fmt, (UINT)GetCurrentThreadId(), __FUNCTION__, ##args); \
60 } while(0)
61 #define ERR(fmt,args...) do { \
62 if(LogLevel >= 0) \
63 fprintf(stderr, "%04x:err:dsound:%s " fmt, (UINT)GetCurrentThreadId(), __FUNCTION__, ##args); \
64 } while(0)
65 #else
66 #define TRACE(args...)
67 #define WARN(args...)
68 #define FIXME(args...)
69 #define ERR(args...)
70 #endif
72 const char *wine_dbg_sprintf( const char *format, ... );
73 const char *wine_dbgstr_wn( const WCHAR *str, int n );
75 static inline const char *debugstr_guid( const GUID *id )
77 if (!id) return "(null)";
78 if (!((ULONG_PTR)id >> 16)) return wine_dbg_sprintf( "<guid-0x%04hx>", (WORD)(ULONG_PTR)id );
79 return wine_dbg_sprintf( "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
80 id->Data1, id->Data2, id->Data3,
81 id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3],
82 id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] );
85 static inline const char *debugstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
87 #endif
90 #include "alext.h"
91 #include "eax.h"
93 /* Set to 1 to build a DLL that can be used in an app that uses OpenAL itself.
94 * Thread-local contexts are needed for true concurrency, however. Disallowing
95 * concurrency can avoid a save and restore of the context. */
96 #define ALLOW_CONCURRENT_AL 0
98 /* All openal functions */
99 extern int openal_loaded;
100 #ifdef SONAME_LIBOPENAL
101 extern LPALCCREATECONTEXT palcCreateContext;
102 extern LPALCMAKECONTEXTCURRENT palcMakeContextCurrent;
103 extern LPALCPROCESSCONTEXT palcProcessContext;
104 extern LPALCSUSPENDCONTEXT palcSuspendContext;
105 extern LPALCDESTROYCONTEXT palcDestroyContext;
106 extern LPALCGETCURRENTCONTEXT palcGetCurrentContext;
107 extern LPALCGETCONTEXTSDEVICE palcGetContextsDevice;
108 extern LPALCOPENDEVICE palcOpenDevice;
109 extern LPALCCLOSEDEVICE palcCloseDevice;
110 extern LPALCGETERROR palcGetError;
111 extern LPALCISEXTENSIONPRESENT palcIsExtensionPresent;
112 extern LPALCGETPROCADDRESS palcGetProcAddress;
113 extern LPALCGETENUMVALUE palcGetEnumValue;
114 extern LPALCGETSTRING palcGetString;
115 extern LPALCGETINTEGERV palcGetIntegerv;
116 extern LPALCCAPTUREOPENDEVICE palcCaptureOpenDevice;
117 extern LPALCCAPTURECLOSEDEVICE palcCaptureCloseDevice;
118 extern LPALCCAPTURESTART palcCaptureStart;
119 extern LPALCCAPTURESTOP palcCaptureStop;
120 extern LPALCCAPTURESAMPLES palcCaptureSamples;
121 extern LPALENABLE palEnable;
122 extern LPALDISABLE palDisable;
123 extern LPALISENABLED palIsEnabled;
124 extern LPALGETSTRING palGetString;
125 extern LPALGETBOOLEANV palGetBooleanv;
126 extern LPALGETINTEGERV palGetIntegerv;
127 extern LPALGETFLOATV palGetFloatv;
128 extern LPALGETDOUBLEV palGetDoublev;
129 extern LPALGETBOOLEAN palGetBoolean;
130 extern LPALGETINTEGER palGetInteger;
131 extern LPALGETFLOAT palGetFloat;
132 extern LPALGETDOUBLE palGetDouble;
133 extern LPALGETERROR palGetError;
134 extern LPALISEXTENSIONPRESENT palIsExtensionPresent;
135 extern LPALGETPROCADDRESS palGetProcAddress;
136 extern LPALGETENUMVALUE palGetEnumValue;
137 extern LPALLISTENERF palListenerf;
138 extern LPALLISTENER3F palListener3f;
139 extern LPALLISTENERFV palListenerfv;
140 extern LPALLISTENERI palListeneri;
141 extern LPALLISTENER3I palListener3i;
142 extern LPALLISTENERIV palListeneriv;
143 extern LPALGETLISTENERF palGetListenerf;
144 extern LPALGETLISTENER3F palGetListener3f;
145 extern LPALGETLISTENERFV palGetListenerfv;
146 extern LPALGETLISTENERI palGetListeneri;
147 extern LPALGETLISTENER3I palGetListener3i;
148 extern LPALGETLISTENERIV palGetListeneriv;
149 extern LPALGENSOURCES palGenSources;
150 extern LPALDELETESOURCES palDeleteSources;
151 extern LPALISSOURCE palIsSource;
152 extern LPALSOURCEF palSourcef;
153 extern LPALSOURCE3F palSource3f;
154 extern LPALSOURCEFV palSourcefv;
155 extern LPALSOURCEI palSourcei;
156 extern LPALSOURCE3I palSource3i;
157 extern LPALSOURCEIV palSourceiv;
158 extern LPALGETSOURCEF palGetSourcef;
159 extern LPALGETSOURCE3F palGetSource3f;
160 extern LPALGETSOURCEFV palGetSourcefv;
161 extern LPALGETSOURCEI palGetSourcei;
162 extern LPALGETSOURCE3I palGetSource3i;
163 extern LPALGETSOURCEIV palGetSourceiv;
164 extern LPALSOURCEPLAYV palSourcePlayv;
165 extern LPALSOURCESTOPV palSourceStopv;
166 extern LPALSOURCEREWINDV palSourceRewindv;
167 extern LPALSOURCEPAUSEV palSourcePausev;
168 extern LPALSOURCEPLAY palSourcePlay;
169 extern LPALSOURCESTOP palSourceStop;
170 extern LPALSOURCEREWIND palSourceRewind;
171 extern LPALSOURCEPAUSE palSourcePause;
172 extern LPALSOURCEQUEUEBUFFERS palSourceQueueBuffers;
173 extern LPALSOURCEUNQUEUEBUFFERS palSourceUnqueueBuffers;
174 extern LPALGENBUFFERS palGenBuffers;
175 extern LPALDELETEBUFFERS palDeleteBuffers;
176 extern LPALISBUFFER palIsBuffer;
177 extern LPALBUFFERF palBufferf;
178 extern LPALBUFFER3F palBuffer3f;
179 extern LPALBUFFERFV palBufferfv;
180 extern LPALBUFFERI palBufferi;
181 extern LPALBUFFER3I palBuffer3i;
182 extern LPALBUFFERIV palBufferiv;
183 extern LPALGETBUFFERF palGetBufferf;
184 extern LPALGETBUFFER3F palGetBuffer3f;
185 extern LPALGETBUFFERFV palGetBufferfv;
186 extern LPALGETBUFFERI palGetBufferi;
187 extern LPALGETBUFFER3I palGetBuffer3i;
188 extern LPALGETBUFFERIV palGetBufferiv;
189 extern LPALBUFFERDATA palBufferData;
190 extern LPALDOPPLERFACTOR palDopplerFactor;
191 extern LPALDOPPLERVELOCITY palDopplerVelocity;
192 extern LPALDISTANCEMODEL palDistanceModel;
193 extern LPALSPEEDOFSOUND palSpeedOfSound;
195 #define alcCreateContext palcCreateContext
196 #define alcMakeContextCurrent palcMakeContextCurrent
197 #define alcProcessContext palcProcessContext
198 #define alcSuspendContext palcSuspendContext
199 #define alcDestroyContext palcDestroyContext
200 #define alcGetCurrentContext palcGetCurrentContext
201 #define alcGetContextsDevice palcGetContextsDevice
202 #define alcOpenDevice palcOpenDevice
203 #define alcCloseDevice palcCloseDevice
204 #define alcGetError palcGetError
205 #define alcIsExtensionPresent palcIsExtensionPresent
206 #define alcGetProcAddress palcGetProcAddress
207 #define alcGetEnumValue palcGetEnumValue
208 #define alcGetString palcGetString
209 #define alcGetIntegerv palcGetIntegerv
210 #define alcCaptureOpenDevice palcCaptureOpenDevice
211 #define alcCaptureCloseDevice palcCaptureCloseDevice
212 #define alcCaptureStart palcCaptureStart
213 #define alcCaptureStop palcCaptureStop
214 #define alcCaptureSamples palcCaptureSamples
215 #define alEnable palEnable
216 #define alDisable palDisable
217 #define alIsEnabled palIsEnabled
218 #define alGetString palGetString
219 #define alGetBooleanv palGetBooleanv
220 #define alGetIntegerv palGetIntegerv
221 #define alGetFloatv palGetFloatv
222 #define alGetDoublev palGetDoublev
223 #define alGetBoolean palGetBoolean
224 #define alGetInteger palGetInteger
225 #define alGetFloat palGetFloat
226 #define alGetDouble palGetDouble
227 #define alGetError palGetError
228 #define alIsExtensionPresent palIsExtensionPresent
229 #define alGetProcAddress palGetProcAddress
230 #define alGetEnumValue palGetEnumValue
231 #define alListenerf palListenerf
232 #define alListener3f palListener3f
233 #define alListenerfv palListenerfv
234 #define alListeneri palListeneri
235 #define alListener3i palListener3i
236 #define alListeneriv palListeneriv
237 #define alGetListenerf palGetListenerf
238 #define alGetListener3f palGetListener3f
239 #define alGetListenerfv palGetListenerfv
240 #define alGetListeneri palGetListeneri
241 #define alGetListener3i palGetListener3i
242 #define alGetListeneriv palGetListeneriv
243 #define alGenSources palGenSources
244 #define alDeleteSources palDeleteSources
245 #define alIsSource palIsSource
246 #define alSourcef palSourcef
247 #define alSource3f palSource3f
248 #define alSourcefv palSourcefv
249 #define alSourcei palSourcei
250 #define alSource3i palSource3i
251 #define alSourceiv palSourceiv
252 #define alGetSourcef palGetSourcef
253 #define alGetSource3f palGetSource3f
254 #define alGetSourcefv palGetSourcefv
255 #define alGetSourcei palGetSourcei
256 #define alGetSource3i palGetSource3i
257 #define alGetSourceiv palGetSourceiv
258 #define alSourcePlayv palSourcePlayv
259 #define alSourceStopv palSourceStopv
260 #define alSourceRewindv palSourceRewindv
261 #define alSourcePausev palSourcePausev
262 #define alSourcePlay palSourcePlay
263 #define alSourceStop palSourceStop
264 #define alSourceRewind palSourceRewind
265 #define alSourcePause palSourcePause
266 #define alSourceQueueBuffers palSourceQueueBuffers
267 #define alSourceUnqueueBuffers palSourceUnqueueBuffers
268 #define alGenBuffers palGenBuffers
269 #define alDeleteBuffers palDeleteBuffers
270 #define alIsBuffer palIsBuffer
271 #define alBufferf palBufferf
272 #define alBuffer3f palBuffer3f
273 #define alBufferfv palBufferfv
274 #define alBufferi palBufferi
275 #define alBuffer3i palBuffer3i
276 #define alBufferiv palBufferiv
277 #define alGetBufferf palGetBufferf
278 #define alGetBuffer3f palGetBuffer3f
279 #define alGetBufferfv palGetBufferfv
280 #define alGetBufferi palGetBufferi
281 #define alGetBuffer3i palGetBuffer3i
282 #define alGetBufferiv palGetBufferiv
283 #define alBufferData palBufferData
284 #define alDopplerFactor palDopplerFactor
285 #define alDopplerVelocity palDopplerVelocity
286 #define alDistanceModel palDistanceModel
287 #define alSpeedOfSound palSpeedOfSound
288 #endif
290 #include <math.h>
291 #include "wingdi.h"
292 #include "mmreg.h"
294 /* OpenAL only allows for 1 single access to the device at the same time */
295 extern CRITICAL_SECTION openal_crst;
297 extern const ALCchar *DSOUND_getdevicestrings(void);
298 extern const ALCchar *DSOUND_getcapturedevicestrings(void);
300 extern LPALCMAKECONTEXTCURRENT set_context;
301 extern LPALCGETCURRENTCONTEXT get_context;
302 extern BOOL local_contexts;
304 /* Device implementation */
305 typedef struct DS8Primary DS8Primary;
306 typedef struct DS8Buffer DS8Buffer;
308 typedef struct DS8Impl
310 IDirectSound8 IDirectSound8_iface;
312 LONG ref;
313 BOOL is_8;
315 LONG *deviceref;
316 ALCdevice *device;
317 DS8Primary *primary;
319 DWORD speaker_config;
320 DWORD prio_level;
321 GUID guid;
322 } DS8Impl;
324 /* Sample types */
325 #define AL_BYTE 0x1400
326 #define AL_UNSIGNED_BYTE 0x1401
327 #define AL_SHORT 0x1402
328 #define AL_UNSIGNED_SHORT 0x1403
329 #define AL_INT 0x1404
330 #define AL_UNSIGNED_INT 0x1405
331 #define AL_FLOAT 0x1406
332 #define AL_DOUBLE 0x1407
333 #define AL_BYTE3 0x1408
334 #define AL_UNSIGNED_BYTE3 0x1409
335 #define AL_MULAW 0x1410
336 #define AL_IMA4 0x1411
338 /* Channel configurations */
339 #define AL_MONO 0x1500
340 #define AL_STEREO 0x1501
341 #define AL_REAR 0x1502
342 #define AL_QUAD 0x1503
343 #define AL_5POINT1 0x1504 /* (WFX order) */
344 #define AL_6POINT1 0x1505 /* (WFX order) */
345 #define AL_7POINT1 0x1506 /* (WFX order) */
347 enum {
348 EXT_EFX,
349 EXT_FLOAT32,
350 EXT_MCFORMATS,
351 EXT_STATIC_BUFFER,
352 SOFT_BUFFER_SAMPLES,
353 SOFT_BUFFER_SUB_DATA,
354 SOFT_DEFERRED_UPDATES,
356 MAX_EXTENSIONS
359 typedef struct ExtALFuncs
361 PFNALBUFFERSUBDATASOFTPROC BufferSubData;
362 PFNALBUFFERDATASTATICPROC BufferDataStatic;
364 LPALGENEFFECTS GenEffects;
365 LPALDELETEEFFECTS DeleteEffects;
366 LPALEFFECTI Effecti;
367 LPALEFFECTF Effectf;
369 LPALGENAUXILIARYEFFECTSLOTS GenAuxiliaryEffectSlots;
370 LPALDELETEAUXILIARYEFFECTSLOTS DeleteAuxiliaryEffectSlots;
371 LPALAUXILIARYEFFECTSLOTI AuxiliaryEffectSloti;
373 void (AL_APIENTRY*BufferSamplesSOFT)(ALuint,ALuint,ALenum,ALsizei,ALenum,ALenum,const ALvoid*);
374 void (AL_APIENTRY*BufferSubSamplesSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,const ALvoid*);
375 void (AL_APIENTRY*GetBufferSamplesSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,ALvoid*);
376 ALboolean (AL_APIENTRY*IsBufferFormatSupportedSOFT)(ALenum);
378 void (AL_APIENTRY*DeferUpdates)(void);
379 void (AL_APIENTRY*ProcessUpdates)(void);
380 } ExtALFuncs;
382 struct DS8Primary
384 IDirectSoundBuffer IDirectSoundBuffer_iface;
385 IDirectSound3DListener IDirectSound3DListener_iface;
386 IKsPropertySet IKsPropertySet_iface;
388 LONG ref, ds3d_ref, prop_ref;
389 IDirectSoundBuffer8 *write_emu;
390 DS8Impl *parent;
392 CRITICAL_SECTION crst;
394 DWORD buf_size;
395 BOOL stopped;
396 DWORD flags;
397 WAVEFORMATEXTENSIBLE format;
398 ALCcontext *ctx;
400 ALboolean SupportedExt[MAX_EXTENSIONS];
402 ALuint *sources;
403 DWORD nsources, sizesources;
404 DWORD max_sources;
405 DS8Buffer **buffers;
406 DWORD nbuffers, sizebuffers;
407 DS8Buffer **notifies;
408 DWORD nnotifies, sizenotifies;
410 UINT timer_id;
411 DWORD timer_res;
412 HANDLE thread_hdl;
413 DWORD thread_id;
415 ALuint auxslot;
416 ALuint effect;
417 EAXLISTENERPROPERTIES eax_prop;
419 ExtALFuncs ExtAL;
420 union {
421 struct {
422 BOOL pos : 1;
423 BOOL vel : 1;
424 BOOL orientation : 1;
425 BOOL distancefactor : 1;
426 BOOL rollofffactor : 1;
427 BOOL dopplerfactor : 1;
428 BOOL effect : 1;
429 } bit;
430 int flags;
431 } dirty;
432 ALfloat rollofffactor;
433 DS3DLISTENER listen;
437 typedef struct DS8Data {
438 LONG ref;
440 /* Lock was called and unlock isn't? */
441 BOOL locked;
443 WAVEFORMATEXTENSIBLE format;
445 ALuint buf_size;
446 ALenum buf_format;
447 ALenum in_type, in_chans;
448 DWORD dsbflags;
449 BYTE *data;
450 ALuint *buffers;
451 ALuint numsegs;
452 ALuint segsize;
453 ALuint lastsegsize;
454 } DS8Data;
455 /* Amount of buffers that have to be queued when
456 * bufferdatastatic and buffersubdata are not available */
457 #define QBUFFERS 3
459 struct DS8Buffer
461 IDirectSoundBuffer8 IDirectSoundBuffer8_iface;
462 IDirectSound3DBuffer IDirectSound3DBuffer_iface;
463 IDirectSoundNotify IDirectSoundNotify_iface;
464 IKsPropertySet IKsPropertySet_iface;
466 LONG ref, ds3d_ref, not_ref, prop_ref;
467 LONG all_ref;
469 DWORD ds3dmode;
470 DS8Primary *primary;
471 DS8Data *buffer;
472 ALuint source;
473 ALuint curidx;
474 BOOL isplaying, islooping, bufferlost;
475 ALCcontext *ctx;
476 ExtALFuncs *ExtAL;
477 CRITICAL_SECTION *crst;
479 DS3DBUFFER ds3dbuffer;
480 union {
481 struct {
482 BOOL pos : 1;
483 BOOL vel : 1;
484 BOOL cone_angles : 1;
485 BOOL cone_orient : 1;
486 BOOL cone_outsidevolume : 1;
487 BOOL min_distance : 1;
488 BOOL max_distance : 1;
489 BOOL mode : 1;
490 } bit;
491 int flags;
492 } dirty;
494 DWORD nnotify, lastpos;
495 DSBPOSITIONNOTIFY *notify;
498 extern HRESULT DS8Primary_Create(DS8Primary **prim, DS8Impl *parent);
499 extern void DS8Primary_Destroy(DS8Primary *prim);
501 extern HRESULT DS8Buffer_Create(DS8Buffer **ppv, DS8Primary *parent, IDirectSoundBuffer *orig);
502 extern void DS8Buffer_Destroy(DS8Buffer *buf);
504 static inline ALdouble gain_to_mB(ALdouble gain)
506 return log10(gain) * 2000.0;
508 static inline ALdouble mB_to_gain(ALdouble millibels)
510 return pow(10.0, millibels/2000.0);
513 static inline LONG clampI(LONG val, LONG minval, LONG maxval)
515 if(val >= maxval) return maxval;
516 if(val <= minval) return minval;
517 return val;
519 static inline ULONG clampU(ULONG val, ULONG minval, ULONG maxval)
521 if(val >= maxval) return maxval;
522 if(val <= minval) return minval;
523 return val;
525 static inline FLOAT clampF(FLOAT val, FLOAT minval, FLOAT maxval)
527 if(val >= maxval) return maxval;
528 if(val <= minval) return minval;
529 return val;
533 #define getALError() \
534 do { \
535 ALenum err = alGetError(); \
536 if(err != AL_NO_ERROR) \
537 ERR(">>>>>>>>>>>> Received AL error %#x on context %p, %s:%u\n", err, get_context(), __FUNCTION__, __LINE__); \
538 } while (0)
540 #define getALCError(dev) \
541 do { \
542 ALenum err = alcGetError(dev); \
543 if(err != ALC_NO_ERROR) \
544 ERR(">>>>>>>>>>>> Received ALC error %#x on device %p, %s:%u\n", err, dev, __FUNCTION__, __LINE__); \
545 } while(0)
547 #if ALLOW_CONCURRENT_AL
549 #define setALContext(actx) \
550 do { \
551 ALCcontext *__old_ctx, *cur_ctx = actx; \
552 if (!local_contexts) EnterCriticalSection(&openal_crst); \
553 __old_ctx = get_context(); \
554 if (__old_ctx != cur_ctx && set_context(cur_ctx) == ALC_FALSE) {\
555 ERR("Couldn't set current context!!\n"); \
556 getALCError(alcGetContextsDevice(cur_ctx)); \
559 /* Only restore a NULL context if using global contexts, for TLS contexts always restore */
560 #define popALContext() \
561 if (__old_ctx != cur_ctx && \
562 (local_contexts || __old_ctx) && \
563 set_context(__old_ctx) == ALC_FALSE) { \
564 ERR("Couldn't restore old context!!\n"); \
565 getALCError(alcGetContextsDevice(__old_ctx)); \
567 if (!local_contexts) LeaveCriticalSection(&openal_crst); \
568 } while (0)
570 #else
572 #define setALContext(actx) \
573 do { \
574 ALCcontext *cur_ctx = actx; \
575 if (!local_contexts) EnterCriticalSection(&openal_crst); \
576 if (set_context(cur_ctx) == ALC_FALSE) { \
577 ERR("Couldn't set current context!!\n"); \
578 getALCError(alcGetContextsDevice(cur_ctx)); \
581 #define popALContext() \
582 if (!local_contexts) LeaveCriticalSection(&openal_crst); \
583 } while (0)
585 #endif
587 HRESULT DSOUND_Create(REFIID riid, void **ppDS);
588 HRESULT DSOUND_Create8(REFIID riid, void **ppDS);
589 HRESULT DSOUND_FullDuplexCreate(REFIID riid, void **ppDSFD);
590 HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, void **piks);
591 HRESULT DSOUND_CaptureCreate(REFIID riid, void **ppDSC);
592 HRESULT DSOUND_CaptureCreate8(REFIID riid, void **ppDSC8);
594 extern const GUID DSOUND_renderer_guid;
595 extern const GUID DSOUND_capture_guid;