source: trunk/Include/directx9/dsound.sbp@ 450

Last change on this file since 450 was 1, checked in by (none), 18 years ago
File size: 27.6 KB
Line 
1' dsound.sbp
2
3
4#ifndef _INC_DSOUND
5#define _INC_DSOUND
6
7
8Const DIRECTSOUND_VERSION = &H0900
9
10
11Const _FACDS = &H878 'DirectSound's facility code
12Const MAKE_DSHRESULT(code) = MAKE_HRESULT(1, _FACDS, code)
13
14
15' DirectSound Component GUID {47D4D946-62E8-11CF-93BC-444553540000}
16Dim CLSID_DirectSound = [&H47d4d946, &H62e8, &H11cf, [&H93, &Hbc, &H44, &H45, &H53, &H54, &H0, &H0]] As GUID
17
18' DirectSound 8.0 Component GUID {3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}
19Dim CLSID_DirectSound8 = [&H3901cc3f, &H84b5, &H4fa4, [&Hba, &H35, &Haa, &H81, &H72, &Hb8, &Ha0, &H9b]] As GUID
20
21' DirectSound Capture Component GUID {B0210780-89CD-11D0-AF08-00A0C925CD16}
22Dim CLSID_DirectSoundCapture = [&Hb0210780, &H89cd, &H11d0, [&Haf, &H8, &H0, &Ha0, &Hc9, &H25, &Hcd, &H16]] As GUID
23
24' DirectSound 8.0 Capture Component GUID {E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}
25Dim CLSID_DirectSoundCapture8 = [&He4bcac13, &H7f99, &H4908, [&H9a, &H8e, &H74, &He3, &Hbf, &H24, &Hb6, &He1]] As GUID
26
27' DirectSound Full Duplex Component GUID {FEA4300C-7959-4147-B26A-2377B9E7A91D}
28Dim CLSID_DirectSoundFullDuplex = [&Hfea4300c, &H7959, &H4147, [&Hb2, &H6a, &H23, &H77, &Hb9, &He7, &Ha9, &H1d]] As GUID
29
30
31' DirectSound default playback device GUID {DEF00000-9C6D-47ED-AAF1-4DDA8F2B5C03}
32Dim DSDEVID_DefaultPlayback = [&Hdef00000, &H9c6d, &H47ed, [&Haa, &Hf1, &H4d, &Hda, &H8f, &H2b, &H5c, &H03]] As GUID
33
34' DirectSound default capture device GUID {DEF00001-9C6D-47ED-AAF1-4DDA8F2B5C03}
35Dim DSDEVID_DefaultCapture = [&Hdef00001, &H9c6d, &H47ed, [&Haa, &Hf1, &H4d, &Hda, &H8f, &H2b, &H5c, &H03]] As GUID
36
37' DirectSound default device for voice playback {DEF00002-9C6D-47ED-AAF1-4DDA8F2B5C03}
38Dim DSDEVID_DefaultVoicePlayback = [&Hdef00002, &H9c6d, &H47ed, [&Haa, &Hf1, &H4d, &Hda, &H8f, &H2b, &H5c, &H03]] As GUID
39
40' DirectSound default device for voice capture {DEF00003-9C6D-47ED-AAF1-4DDA8F2B5C03}
41Dim DSDEVID_DefaultVoiceCapture = [&Hdef00003, &H9c6d, &H47ed, [&Haa, &Hf1, &H4d, &Hda, &H8f, &H2b, &H5c, &H03]] As GUID
42
43
44Type DSCAPS
45 dwSize As DWord
46 dwFlags As DWord
47 dwMinSecondarySampleRate As DWord
48 dwMaxSecondarySampleRate As DWord
49 dwPrimaryBuffers As DWord
50 dwMaxHwMixingAllBuffers As DWord
51 dwMaxHwMixingStaticBuffers As DWord
52 dwMaxHwMixingStreamingBuffers As DWord
53 dwFreeHwMixingAllBuffers As DWord
54 dwFreeHwMixingStaticBuffers As DWord
55 dwFreeHwMixingStreamingBuffers As DWord
56 dwMaxHw3DAllBuffers As DWord
57 dwMaxHw3DStaticBuffers As DWord
58 dwMaxHw3DStreamingBuffers As DWord
59 dwFreeHw3DAllBuffers As DWord
60 dwFreeHw3DStaticBuffers As DWord
61 dwFreeHw3DStreamingBuffers As DWord
62 dwTotalHwMemBytes As DWord
63 dwFreeHwMemBytes As DWord
64 dwMaxContigFreeHwMemBytes As DWord
65 dwUnlockTransferRateHwBuffers As DWord
66 dwPlayCpuOverheadSwBuffers As DWord
67 dwReserved1 As DWord
68 dwReserved2 As DWord
69End Type
70
71Type DSBCAPS
72 dwSize As DWord
73 dwFlags As DWord
74 dwBufferBytes As DWord
75 dwUnlockTransferRate As DWord
76 dwPlayCpuOverhead As DWord
77End Type
78
79Const DSFX_LOCHARDWARE = &H00000001
80Const DSFX_LOCSOFTWARE = &H00000002
81Type DSEFFECTDESC
82 dwSize As DWord
83 dwFlags As DWord
84 guidDSFXClass As GUID
85 dwReserved1 As DWord
86 dwReserved2 As DWord
87End Type
88
89Const DSCFX_LOCHARDWARE = &H00000001
90Const DSCFX_LOCSOFTWARE = &H00000002
91Const DSCFXR_LOCHARDWARE = &H00000010
92Const DSCFXR_LOCSOFTWARE = &H00000020
93Type DSCEFFECTDESC
94 dwSize As DWord
95 dwFlags As DWord
96 guidDSCFXClass As GUID
97 guidDSCFXInstance As GUID
98 dwReserved1 As DWord
99 dwReserved2 As DWord
100End Type
101
102Type DSBUFFERDESC
103 dwSize As DWord
104 dwFlags As DWord
105 dwBufferBytes As DWord
106 dwReserved As DWord
107 lpwfxFormat As *WAVEFORMATEX
108 guid3DAlgorithm As GUID
109End Type
110
111Type DS3DBUFFER
112 dwSize As DWord
113 vPosition As D3DVECTOR
114 vVelocity As D3DVECTOR
115 dwInsideConeAngle As DWord
116 dwOutsideConeAngle As DWord
117 vConeOrientation As D3DVECTOR
118 lConeOutsideVolume As Long
119 flMinDistance As Single
120 flMaxDistance As Single
121 dwMode As DWord
122End Type
123
124Type DS3DLISTENER
125 dwSize As DWord
126 vPosition As D3DVECTOR
127 vVelocity As D3DVECTOR
128 vOrientFront As D3DVECTOR
129 vOrientTop As D3DVECTOR
130 flDistanceFactor As Single
131 flRolloffFactor As Single
132 flDopplerFactor As Single
133End Type
134
135Type DSCCAPS
136 dwSize As DWord
137 dwFlags As DWord
138 dwFormats As DWord
139 dwChannels As DWord
140End Type
141
142Type DSCBUFFERDESC
143 dwSize As DWord
144 dwFlags As DWord
145 dwBufferBytes As DWord
146 dwReserved As DWord
147 lpwfxFormat As *WAVEFORMATEX
148 dwFXCount As DWord
149 lpDSCFXDesc As *DSCEFFECTDESC
150End Type
151
152Type DSCBCAPS
153 dwSize As DWord
154 dwFlags As DWord
155 dwBufferBytes As DWord
156 dwReserved As DWord
157End Type
158
159Type DSBPOSITIONNOTIFY
160 dwOffset As DWord
161 hEventNotify As HANDLE
162End Type
163
164
165'------------------------
166' DirectSound Interfaces
167'------------------------
168
169Class IReferenceClock
170 Inherits IUnknown
171Public
172 'IReferenceClock methods
173 Abstract Function GetTime(pTime As *REFERENCE_TIME) As DWord
174 Abstract Function AdviseTime(rtBaseTime As REFERENCE_TIME, rtStreamTime As REFERENCE_TIME, hEvent As HANDLE, pdwAdviseCookie As DWordPtr) As DWord
175 Abstract Function AdvisePeriodic(rtStartTime As REFERENCE_TIME, rtPeriodTime As REFERENCE_TIME, hSemaphore As HANDLE, pdwAdviseCookie As DWordPtr) As DWord
176 Abstract Function Unadvise(dwAdviseCookie As DWord) As DWord
177End Class
178
179Dim IID_IDirectSound = [&H279AFA83, &H4981, &H11CE, [&HA5, &H21, &H00, &H20, &HAF, &H0B, &HE5, &H60]] As GUID
180Class IDirectSound
181 Inherits IUnknown
182Public
183 'IDirectSound methods
184 Abstract Function CreateSoundBuffer(pcDSBufferDesc As *DSBUFFERDESC, ppDSBuffer As *LPDIRECTSOUNDBUFFER, pUnkOuter As LPUNKNOWN) As DWord
185 Abstract Function GetCaps(pDSCaps As *DSCAPS) As DWord
186 Abstract Function DuplicateSoundBuffer(pDSBufferOriginal As LPDIRECTSOUNDBUFFER, ppDSBufferDuplicate As *LPDIRECTSOUNDBUFFER) As DWord
187 Abstract Function SetCooperativeLevel(hwnd As HWND, dwLevel As DWord) As DWord
188 Abstract Function Compact() As DWord
189 Abstract Function GetSpeakerConfig(pdwSpeakerConfig As DWordPtr) As DWord
190 Abstract Function SetSpeakerConfig(dwSpeakerConfig As DWord) As DWord
191 Abstract Function Initialize(pcGuidDevice As *GUID) As DWord
192End Class
193TypeDef LPDIRECTSOUND = *IDirectSound
194
195Dim IID_IDirectSound8 = [&HC50A7E93, &HF395, &H4834, [&H9E, &HF6, &H7F, &HA9, &H9D, &HE5, &H09, &H66]] As GUID
196Class IDirectSound8
197 Inherits IDirectSound
198Public
199 'IDirectSound8 methods
200 Abstract Function VerifyCertification(pdwCertified As DWordPtr) As DWord
201End Class
202TypeDef LPDIRECTSOUND8 = *IDirectSound8
203
204Dim IID_IDirectSoundBuffer = [&H279AFA85, &H4981, &H11CE, [&HA5, &H21, &H00, &H20, &HAF, &H0B, &HE5, &H60]] As GUID
205Class IDirectSoundBuffer
206 Inherits IUnknown
207Public
208 'IDirectSoundBuffer methods
209 Abstract Function GetCaps(pDSBufferCaps As *DSBCAPS) As DWord
210 Abstract Function GetCurrentPosition(pdwCurrentPlayCursor As DWordPtr, pdwCurrentWriteCursor As DWordPtr) As DWord
211 Abstract Function GetFormat(pwfxFormat As *WAVEFORMATEX, dwSizeAllocated As DWord, pdwSizeWritten As DWordPtr) As DWord
212 Abstract Function GetVolume(plVolume As *Long) As DWord
213 Abstract Function GetPan(plPan As *Long) As DWord
214 Abstract Function GetFrequency(pdwFrequency As DWordPtr) As DWord
215 Abstract Function GetStatus(pdwStatus As DWordPtr) As DWord
216 Abstract Function Initialize(pDirectSound As LPDIRECTSOUND, pcDSBufferDesc As *DSBUFFERDESC) As DWord
217 Abstract Function Lock(dwOffset As DWord, dwBytes As DWord, ppvAudioPtr1 As DWordPtr, pdwAudioBytes1 As DWordPtr, ppvAudioPtr2 As DWordPtr, pdwAudioBytes2 As DWordPtr, dwFlags As DWord) As DWord
218 Abstract Function Play(dwReserved1 As DWord, dwPriority As DWord, dwFlags As DWord) As DWord
219 Abstract Function SetCurrentPosition(dwNewPosition As DWord) As DWord
220 Abstract Function SetFormat(pcfxFormat As *WAVEFORMATEX) As DWord
221 Abstract Function SetVolume(lVolume As Long) As DWord
222 Abstract Function SetPan(lPan As Long) As DWord
223 Abstract Function SetFrequency(dwFrequency As DWord) As DWord
224 Abstract Function Stop() As DWord
225 Abstract Function Unlock(pvAudioPtr1 As VoidPtr, dwAudioBytes1 As DWord, pvAudioPtr2 As VoidPtr, dwAudioBytes2 As DWord) As DWord
226 Abstract Function Restore() As DWord
227End Class
228TypeDef LPDIRECTSOUNDBUFFER = *IDirectSoundBuffer
229
230Dim IID_IDirectSoundBuffer8 = [&H6825a449, &H7524, &H4d82, [&H92, &H0f, &H50, &He3, &H6a, &Hb3, &Hab, &H1e]] As GUID
231Class IDirectSoundBuffer8
232 Inherits IDirectSoundBuffer
233Public
234 'IDirectSoundBuffer8 methods
235 Abstract Function SetFX(dwEffectsCount As DWord, pDSFXDesc As *DSEFFECTDESC, pdwResultCodes As DWordPtr) As DWord
236 Abstract Function AcquireResources(dwFlags As DWord, dwEffectsCount As DWord, pdwResultCodes As DWordPtr) As DWord
237 Abstract Function GetObjectInPath(ByRef rguidObject As GUID, dwIndex As DWord, ByRef rguidInterface As GUID, ppObject As DWordPtr) As DWord
238End Class
239TypeDef LPDIRECTSOUNDBUFFER8 = *IDirectSoundBuffer8
240
241' Special GUID meaning "select all objects" for use in GetObjectInPath()
242Dim GUID_All_Objects = [&Haa114de5, &Hc262, &H4169, [&Ha1, &Hc8, &H23, &Hd6, &H98, &Hcc, &H73, &Hb5]] As GUID
243
244Dim IID_IDirectSound3DListener = [&H279AFA84, &H4981, &H11CE, [&HA5, &H21, &H00, &H20, &HAF, &H0B, &HE5, &H60]] As GUID
245Class IDirectSound3DListener
246 Inherits IUnknown
247Public
248 'IDirectSound3DListener methods
249 Abstract Function GetAllParameters(pListener As *DS3DLISTENER) As DWord
250 Abstract Function GetDistanceFactor(pflDistanceFactor As SinglePtr) As DWord
251 Abstract Function GetDopplerFactor(pflDopplerFactor As SinglePtr) As DWord
252 Abstract Function GetOrientation(pvOrientFront As *D3DVECTOR, pvOrientTop As *D3DVECTOR) As DWord
253 Abstract Function GetPosition(pvPosition As *D3DVECTOR) As DWord
254 Abstract Function GetRolloffFactor(pflRolloffFactor As SinglePtr) As DWord
255 Abstract Function GetVelocity(pvVelocity As *D3DVECTOR) As DWord
256 Abstract Function SetAllParameters(pcListener As *DS3DLISTENER, dwApply As DWord) As DWord
257 Abstract Function SetDistanceFactor(flDistanceFactor As Single, dwApply As DWord) As DWord
258 Abstract Function SetDopplerFactor(flDopplerFactor As Single, dwApply As DWord) As DWord
259 Abstract Function SetOrientation(xFront As Single, yFront As Single, zFront As Single, xTop As Single, yTop As Single, zTop As Single, dwApply As DWord) As DWord
260 Abstract Function SetPosition(x As Single, y As Single, z As Single, dwApply As DWord) As DWord
261 Abstract Function SetRolloffFactor(flRolloffFactor As Single, dwApply As DWord) As DWord
262 Abstract Function SetVelocity(x As Single, y As Single, z As Single, dwApply As DWord) As DWord
263 Abstract Function CommitDeferredSettings() As DWord
264End Class
265TypeDef LPDIRECTSOUND3DLISTENER = *IDirectSound3DListener
266Dim IID_IDirectSound3DListener8 As GUID
267IID_IDirectSound3DListener8=IID_IDirectSound3DListener
268TypeDef IDirectSound3DListener8 = IDirectSound3DListener
269TypeDef LPDIRECTSOUND3DLISTENER8 = *IDirectSound3DListener8
270
271Dim IID_IDirectSound3DBuffer = [&H279AFA86, &H4981, &H11CE, [&HA5, &H21, &H00, &H20, &HAF, &H0B, &HE5, &H60]] As GUID
272Class IDirectSound3DBuffer
273 Inherits IUnknown
274Public
275 'IDirectSound3DBuffer methods
276 Abstract Function GetAllParameters(pDs3dBuffer As *DS3DBUFFER) As DWord
277 Abstract Function GetConeAngles(pdwInsideConeAngle As DWordPtr, pdwOutsideConeAngle As DWordPtr) As DWord
278 Abstract Function GetConeOrientation(pvOrientation As *D3DVECTOR) As DWord
279 Abstract Function GetConeOutsideVolume(plConeOutsideVolume As *Long) As DWord
280 Abstract Function GetMaxDistance(pflMaxDistance As SinglePtr) As DWord
281 Abstract Function GetMinDistance(pflMinDistance As SinglePtr) As DWord
282 Abstract Function GetMode(pdwMode As DWordPtr) As DWord
283 Abstract Function GetPosition(pvPosition As *D3DVECTOR) As DWord
284 Abstract Function GetVelocity(pvVelocity As *D3DVECTOR) As DWord
285 Abstract Function SetAllParameters(pcDs3dBuffer As *DS3DBUFFER, dwApply As DWord) As DWord
286 Abstract Function SetConeAngles(dwInsideConeAngle As DWord, dwOutsideConeAngle As DWord, dwApply As DWord) As DWord
287 Abstract Function SetConeOrientation(x As Single, y As Single, z As Single, dwApply As DWord) As DWord
288 Abstract Function SetConeOutsideVolume(lConeOutsideVolume As Long, dwApply As DWord) As DWord
289 Abstract Function SetMaxDistance(flMaxDistance As Single, dwApply As DWord) As DWord
290 Abstract Function SetMinDistance(flMinDistance As Single, dwApply As DWord) As DWord
291 Abstract Function SetMode(dwMode As DWord, dwApply As DWord) As DWord
292 Abstract Function SetPosition(x As Single, y As Single, z As Single, dwApply As DWord) As DWord
293 Abstract Function SetVelocity(x As Single, y As Single, z As Single, dwApply As DWord) As DWord
294End Class
295TypeDef LPDIRECTSOUND3DBUFFER = *IDirectSound3DBuffer
296Dim IID_IDirectSound3DBuffer8 As GUID
297IID_IDirectSound3DBuffer8=IID_IDirectSound3DBuffer
298TypeDef IDirectSound3DBuffer8 = IDirectSound3DBuffer
299TypeDef LPDIRECTSOUND3DBUFFER8 = *IDirectSound3DBuffer8
300
301Dim IID_IDirectSoundCapture = [&Hb0210781, &H89cd, &H11d0, [&Haf, &H8, &H0, &Ha0, &Hc9, &H25, &Hcd, &H16]] As GUID
302Class IDirectSoundCapture
303 Inherits IUnknown
304Public
305 'IDirectSoundCapture methods
306 Abstract Function CreateCaptureBuffer(pcDSCBufferDesc As *DSCBUFFERDESC, ppDSCBuffer As *LPDIRECTSOUNDCAPTUREBUFFER, pUnkOuter As LPUNKNOWN) As DWord
307 Abstract Function GetCaps(pDSCCaps As *DSCCAPS) As DWord
308 Abstract Function Initialize(pcGuidDevice As *GUID) As DWord
309End Class
310TypeDef LPDIRECTSOUNDCAPTURE = *IDirectSoundCapture
311TypeDef IDirectSoundCapture8 = IDirectSoundCapture
312TypeDef LPDIRECTSOUNDCAPTURE8 = *IDirectSoundCapture8
313
314Dim IID_IDirectSoundCaptureBuffer = [&Hb0210782, &H89cd, &H11d0, [&Haf, &H8, &H0, &Ha0, &Hc9, &H25, &Hcd, &H16]] As GUID
315Class IDirectSoundCaptureBuffer
316 Inherits IUnknown
317Public
318 'IDirectSoundCaptureBuffer methods
319 Abstract Function GetCaps(pDSCBCaps As *DSCBCAPS) As DWord
320 Abstract Function GetCurrentPosition(pdwCapturePosition As DWordPtr, pdwReadPosition As DWordPtr) As DWord
321 Abstract Function GetFormat(pwfxFormat As *WAVEFORMATEX, dwSizeAllocated As DWord, pdwSizeWritten As DWordPtr) As DWord
322 Abstract Function GetStatus(pdwStatus As DWordPtr) As DWord
323 Abstract Function Initialize(pDirectSoundCapture As LPDIRECTSOUNDCAPTURE, pcDSCBufferDesc As *DSCBUFFERDESC) As DWord
324 Abstract Function Lock(dwOffset As DWord, dwBytes As DWord, ppvAudioPtr1 As DWordPtr, pdwAudioBytes1 As DWordPtr, ppvAudioPtr2 As DWordPtr, pdwAudioBytes2 As DWordPtr, dwFlags As DWord) As DWord
325 Abstract Function Start(dwFlags As DWord) As DWord
326 Abstract Function Stop() As DWord
327 Abstract Function Unlock(pvAudioPtr1 As VoidPtr, dwAudioBytes1 As DWord, pvAudioPtr2 As VoidPtr, dwAudioBytes2 As DWord) As DWord
328End Class
329TypeDef LPDIRECTSOUNDCAPTUREBUFFER = *IDirectSoundCaptureBuffer
330
331Dim IID_IDirectSoundCaptureBuffer8 = [&H990df4, &Hdbb, &H4872, [&H83, &H3e, &H6d, &H30, &H3e, &H80, &Hae, &Hb6]] As GUID
332Class IDirectSoundCaptureBuffer8
333 Inherits IDirectSoundCaptureBuffer
334Public
335 'IDirectSoundCaptureBuffer8 methods
336 Abstract Function GetObjectInPath(ByRef rguidObject As GUID, dwIndex As DWord, ByRef rguidInterface As GUID, ppObject As DWord) As DWord
337 Abstract Function GetFXStatus(dwFXCount As DWord, pdwFXStatus As DWordPtr) As DWord
338End Class
339TypeDef LPDIRECTSOUNDCAPTUREBUFFER8 = *IDirectSoundCaptureBuffer8
340
341Dim IID_IDirectSoundNotify = [&Hb0210783, &H89cd, &H11d0, [&Haf, &H8, &H0, &Ha0, &Hc9, &H25, &Hcd, &H16]] As GUID
342Class IDirectSoundNotify
343 Inherits IUnknown
344Public
345 'IDirectSoundNotify methods
346 Abstract Function SetNotificationPositions(dwPositionNotifies As DWord, pcPositionNotifies As *DSBPOSITIONNOTIFY) As DWord
347End Class
348TypeDef LPDIRECTSOUNDNOTIFY = *IDirectSoundNotify
349
350Dim IID_IKsPropertySet = [&H31efac30, &H515c, &H11d0, [&Ha9, &Haa, &H00, &Haa, &H00, &H61, &Hbe, &H93]] As GUID
351Class IKsPropertySet
352 Inherits IUnknown
353Public
354 'IKsPropertySet methods
355 Abstract Function Get(ByRef rguidPropSet As GUID, ulId As DWord, pInstanceData As VoidPtr, ulInstanceLength As DWord, pPropertyData As VoidPtr, ulDataLength As DWord, pulBytesReturned As DWordPtr) As DWord
356 Abstract Function Set(ByRef rguidPropSet As GUID, ulId As DWord, pInstanceData As VoidPtr, ulInstanceLength As DWord, pPropertyData As VoidPtr, ulDataLength As DWord) As DWord
357 Abstract Function QuerySupport(ByRef rguidPropSet As GUID, ulId As DWord, pulTypeSupport As DWordPtr) As DWord
358End Class
359TypeDef LPKSPROPERTYSET = *IKsPropertySet
360
361Dim IID_IDirectSoundFullDuplex = [&Hedcb4c7a, &Hdaab, &H4216, [&Ha4, &H2e, &H6c, &H50, &H59, &H6d, &Hdc, &H1d]] As GUID
362Class IDirectSoundFullDuplex
363 Inherits IUnknown
364Public
365 'IDirectSoundFullDuplex methods
366 Abstract Function Initialize(pCaptureGuid As *GUID, pRenderGuid As *GUID, lpDscBufferDesc As *DSCBUFFERDESC, lpDsBufferDesc As *DSBUFFERDESC, hWnd As HWND, dwLevel As DWord, lplpDirectSoundCaptureBuffer8 As *LPDIRECTSOUNDCAPTUREBUFFER8, lplpDirectSoundBuffer8 As *LPDIRECTSOUNDBUFFER8) As DWord
367End Class
368TypeDef LPDIRECTSOUNDFULLDUPLEX = *IDirectSoundFullDuplex
369
370
371'-------------------
372' DirectSound APIs
373'-------------------
374
375Declare Function DirectSoundCreate Lib "dsound" (pcGuidDevice As *GUID, ppDS As *LPDIRECTSOUND, pUnkOuter As LPUNKNOWN) As DWord
376Declare Function DirectSoundEnumerate Lib "dsound" Alias "DirectSoundEnumerateA" (pDSEnumCallback As VoidPtr, pContext As VoidPtr) As DWord
377Declare Function DirectSoundCaptureCreate Lib "dsound" (pcGuidDevice As *GUID, ppDSC As *LPDIRECTSOUNDCAPTURE, pUnkOuter As LPUNKNOWN) As DWord
378Declare Function DirectSoundCaptureEnumerate Lib "dsound" Alias "DirectSoundCaptureEnumerateA" (pDSEnumCallback As VoidPtr, pContext As VoidPtr) As DWord
379Declare Function DirectSoundCreate8 Lib "dsound" (pcGuidDevice As *GUID, ppDS8 As *LPDIRECTSOUND8, pUnkOuter As LPUNKNOWN) As DWord
380Declare Function DirectSoundCaptureCreate8 Lib "dsound" (pcGuidDevice As *GUID, ppDSC8 As *LPDIRECTSOUNDCAPTURE8, pUnkOuter As LPUNKNOWN) As DWord
381Declare Function DirectSoundFullDuplexCreate Lib "dsound" (pcGuidCaptureDevice As *GUID, pcGuidRenderDevice As *GUID, pcDSCBufferDesc As *DSCBUFFERDESC, pcDSBufferDesc As *DSBUFFERDESC, hWnd As HWND, dwLevel As DWord, ppDSFD As *LPDIRECTSOUNDFULLDUPLEX, ppDSCBuffer8 As *LPDIRECTSOUNDCAPTUREBUFFER8, ppDSBuffer8 As *LPDIRECTSOUNDBUFFER8, pUnkOuter As LPUNKNOWN) As DWord
382Declare Function GetDeviceID Lib "dsound" (pGuidSrc As *GUID, pGuidDest As *GUID) As DWord
383
384
385'--------------
386' Return Codes
387'--------------
388
389' The function completed successfully
390Const DS_OK = S_OK
391
392' The call succeeded, but we had to substitute the 3D algorithm
393Const DS_NO_VIRTUALIZATION = MAKE_HRESULT(0, _FACDS, 10)
394
395' The call failed because resources (such as a priority level)
396' were already being used by another caller
397Const DSERR_ALLOCATED = MAKE_DSHRESULT(10)
398
399' The control (vol, pan, etc.) requested by the caller is not available
400Const DSERR_CONTROLUNAVAIL = MAKE_DSHRESULT(30)
401
402' An invalid parameter was passed to the returning function
403Const DSERR_INVALIDPARAM = E_INVALIDARG
404
405' This call is not valid for the current state of this object
406Const DSERR_INVALIDCALL = MAKE_DSHRESULT(50)
407
408' An undetermined error occurred inside the DirectSound subsystem
409Const DSERR_GENERIC = E_FAIL
410
411' The caller does not have the priority level required for the function to
412' succeed
413Const DSERR_PRIOLEVELNEEDED = MAKE_DSHRESULT(70)
414
415' Not enough free memory is available to complete the operation
416Const DSERR_OUTOFMEMORY = E_OUTOFMEMORY
417
418' The specified WAVE format is not supported
419Const DSERR_BADFORMAT = MAKE_DSHRESULT(100)
420
421' The function called is not supported at this time
422Const DSERR_UNSUPPORTED = E_NOTIMPL
423
424' No sound driver is available for use
425Const DSERR_NODRIVER = MAKE_DSHRESULT(120)
426
427' This object is already initialized
428Const DSERR_ALREADYINITIALIZED = MAKE_DSHRESULT(130)
429
430' This object does not support aggregation
431Const DSERR_NOAGGREGATION = CLASS_E_NOAGGREGATION
432
433' The buffer memory has been lost, and must be restored
434Const DSERR_BUFFERLOST = MAKE_DSHRESULT(150)
435
436' Another app has a higher priority level, preventing this call from
437' succeeding
438Const DSERR_OTHERAPPHASPRIO = MAKE_DSHRESULT(160)
439
440' This object has not been initialized
441Const DSERR_UNINITIALIZED = MAKE_DSHRESULT(170)
442
443' The requested COM interface is not available
444Const DSERR_NOINTERFACE = E_NOINTERFACE
445
446' Access is denied
447Const DSERR_ACCESSDENIED = E_ACCESSDENIED
448
449' Tried to create a DSBCAPS_CTRLFX buffer shorter than DSBSIZE_FX_MIN milliseconds
450Const DSERR_BUFFERTOOSMALL = MAKE_DSHRESULT(180)
451
452' Attempt to use DirectSound 8 functionality on an older DirectSound object
453Const DSERR_DS8_REQUIRED = MAKE_DSHRESULT(190)
454
455' A circular loop of send effects was detected
456Const DSERR_SENDLOOP = MAKE_DSHRESULT(200)
457
458' The GUID specified in an audiopath file does not match a valid MIXIN buffer
459Const DSERR_BADSENDBUFFERGUID = MAKE_DSHRESULT(210)
460
461' The object requested was not found (numerically equal to DMUS_E_NOT_FOUND)
462Const DSERR_OBJECTNOTFOUND = MAKE_DSHRESULT(4449)
463
464' The effects requested could not be found on the system, or they were found
465' but in the wrong order, or in the wrong hardware/software locations.
466Const DSERR_FXUNAVAILABLE = MAKE_DSHRESULT(220)
467
468
469'--------
470' Flags
471'--------
472
473Const DSCAPS_PRIMARYMONO = &H00000001
474Const DSCAPS_PRIMARYSTEREO = &H00000002
475Const DSCAPS_PRIMARY8BIT = &H00000004
476Const DSCAPS_PRIMARY16BIT = &H00000008
477Const DSCAPS_CONTINUOUSRATE = &H00000010
478Const DSCAPS_EMULDRIVER = &H00000020
479Const DSCAPS_CERTIFIED = &H00000040
480Const DSCAPS_SECONDARYMONO = &H00000100
481Const DSCAPS_SECONDARYSTEREO = &H00000200
482Const DSCAPS_SECONDARY8BIT = &H00000400
483Const DSCAPS_SECONDARY16BIT = &H00000800
484
485Const DSSCL_NORMAL = &H00000001
486Const DSSCL_PRIORITY = &H00000002
487Const DSSCL_EXCLUSIVE = &H00000003
488Const DSSCL_WRITEPRIMARY = &H00000004
489
490Const DSSPEAKER_DIRECTOUT = &H00000000
491Const DSSPEAKER_HEADPHONE = &H00000001
492Const DSSPEAKER_MONO = &H00000002
493Const DSSPEAKER_QUAD = &H00000003
494Const DSSPEAKER_STEREO = &H00000004
495Const DSSPEAKER_SURROUND = &H00000005
496Const DSSPEAKER_5POINT1 = &H00000006
497Const DSSPEAKER_7POINT1 = &H00000007
498
499Const DSSPEAKER_GEOMETRY_MIN = &H00000005 ' 5 degrees
500Const DSSPEAKER_GEOMETRY_NARROW = &H0000000A ' 10 degrees
501Const DSSPEAKER_GEOMETRY_WIDE = &H00000014 ' 20 degrees
502Const DSSPEAKER_GEOMETRY_MAX = &H000000B4 ' 180 degrees
503
504Const DSBCAPS_PRIMARYBUFFER = &H00000001
505Const DSBCAPS_STATIC = &H00000002
506Const DSBCAPS_LOCHARDWARE = &H00000004
507Const DSBCAPS_LOCSOFTWARE = &H00000008
508Const DSBCAPS_CTRL3D = &H00000010
509Const DSBCAPS_CTRLFREQUENCY = &H00000020
510Const DSBCAPS_CTRLPAN = &H00000040
511Const DSBCAPS_CTRLVOLUME = &H00000080
512Const DSBCAPS_CTRLPOSITIONNOTIFY = &H00000100
513Const DSBCAPS_CTRLFX = &H00000200
514Const DSBCAPS_STICKYFOCUS = &H00004000
515Const DSBCAPS_GLOBALFOCUS = &H00008000
516Const DSBCAPS_GETCURRENTPOSITION2 = &H00010000
517Const DSBCAPS_MUTE3DATMAXDISTANCE = &H00020000
518Const DSBCAPS_LOCDEFER = &H00040000
519
520Const DSBPLAY_LOOPING = &H00000001
521Const DSBPLAY_LOCHARDWARE = &H00000002
522Const DSBPLAY_LOCSOFTWARE = &H00000004
523Const DSBPLAY_TERMINATEBY_TIME = &H00000008
524Const DSBPLAY_TERMINATEBY_DISTANCE = &H000000010
525Const DSBPLAY_TERMINATEBY_PRIORITY = &H000000020
526
527Const DSBSTATUS_PLAYING = &H00000001
528Const DSBSTATUS_BUFFERLOST = &H00000002
529Const DSBSTATUS_LOOPING = &H00000004
530Const DSBSTATUS_LOCHARDWARE = &H00000008
531Const DSBSTATUS_LOCSOFTWARE = &H00000010
532Const DSBSTATUS_TERMINATED = &H00000020
533
534Const DSBLOCK_FROMWRITECURSOR = &H00000001
535Const DSBLOCK_ENTIREBUFFER = &H00000002
536
537Const DSBFREQUENCY_ORIGINAL = 0
538Const DSBFREQUENCY_MIN = 100
539Const DSBFREQUENCY_MAX = 200000
540
541Const DSBPAN_LEFT = -10000
542Const DSBPAN_CENTER = 0
543Const DSBPAN_RIGHT = 10000
544
545Const DSBVOLUME_MIN = -10000
546Const DSBVOLUME_MAX = 0
547
548Const DSBSIZE_MIN = 4
549Const DSBSIZE_MAX = &H0FFFFFFF
550Const DSBSIZE_FX_MIN = 150 ' NOTE: Milliseconds, not bytes
551
552Const DS3DMODE_NORMAL = &H00000000
553Const DS3DMODE_HEADRELATIVE = &H00000001
554Const DS3DMODE_DISABLE = &H00000002
555
556Const DS3D_IMMEDIATE = &H00000000
557Const DS3D_DEFERRED = &H00000001
558
559Const DS3D_MINDISTANCEFACTOR = FLT_MIN
560Const DS3D_MAXDISTANCEFACTOR = FLT_MAX
561Const DS3D_DEFAULTDISTANCEFACTOR = 1.0
562
563Const DS3D_MINROLLOFFFACTOR = 0.0
564Const DS3D_MAXROLLOFFFACTOR = 10.0
565Const DS3D_DEFAULTROLLOFFFACTOR = 1.0
566
567Const DS3D_MINDOPPLERFACTOR = 0.0
568Const DS3D_MAXDOPPLERFACTOR = 10.0
569Const DS3D_DEFAULTDOPPLERFACTOR = 1.0
570
571Const DS3D_DEFAULTMINDISTANCE = 1.0
572Const DS3D_DEFAULTMAXDISTANCE = 1000000000.0
573
574Const DS3D_MINCONEANGLE = 0
575Const DS3D_MAXCONEANGLE = 360
576Const DS3D_DEFAULTCONEANGLE = 360
577
578Const DS3D_DEFAULTCONEOUTSIDEVOLUME = DSBVOLUME_MAX
579
580' IDirectSoundCapture attributes
581
582Const DSCCAPS_EMULDRIVER = DSCAPS_EMULDRIVER
583Const DSCCAPS_CERTIFIED = DSCAPS_CERTIFIED
584Const DSCCAPS_MULTIPLECAPTURE = &H00000001
585
586' IDirectSoundCaptureBuffer attributes
587
588Const DSCBCAPS_WAVEMAPPED = &H80000000
589
590Const DSCBCAPS_CTRLFX = &H00000200
591
592
593Const DSCBLOCK_ENTIREBUFFER = &H00000001
594
595Const DSCBSTATUS_CAPTURING = &H00000001
596Const DSCBSTATUS_LOOPING = &H00000002
597
598Const DSCBSTART_LOOPING = &H00000001
599
600Const DSBPN_OFFSETSTOP = &HFFFFFFFF
601
602Const DS_CERTIFIED = &H00000000
603Const DS_UNCERTIFIED = &H00000001
604
605
606'----------------------------------------
607' DirectSound Internal Effect Algorithms
608'----------------------------------------
609
610' Gargle {DAFD8210-5711-4B91-9FE3-F75B7AE279BF}
611Dim GUID_DSFX_STANDARD_GARGLE = [&Hdafd8210, &H5711, &H4b91, [&H9f, &He3, &Hf7, &H5b, &H7a, &He2, &H79, &Hbf]] As GUID
612
613' Chorus {EFE6629C-81F7-4281-BD91-C9D604A95AF6}
614Dim GUID_DSFX_STANDARD_CHORUS = [&Hefe6629c, &H81f7, &H4281, [&Hbd, &H91, &Hc9, &Hd6, &H04, &Ha9, &H5a, &Hf6]] As GUID
615
616' Flanger {EFCA3D92-DFD8-4672-A603-7420894BAD98}
617Dim GUID_DSFX_STANDARD_FLANGER = [&Hefca3d92, &Hdfd8, &H4672, [&Ha6, &H03, &H74, &H20, &H89, &H4b, &Had, &H98]] As GUID
618
619' Echo/Delay {EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D}
620Dim GUID_DSFX_STANDARD_ECHO = [&Hef3e932c, &Hd40b, &H4f51, [&H8c, &Hcf, &H3f, &H98, &Hf1, &Hb2, &H9d, &H5d]] As GUID
621
622' Distortion {EF114C90-CD1D-484E-96E5-09CFAF912A21}
623Dim GUID_DSFX_STANDARD_DISTORTION = [&Hef114c90, &Hcd1d, &H484e, [&H96, &He5, &H09, &Hcf, &Haf, &H91, &H2a, &H21]] As GUID
624
625' Compressor/Limiter {EF011F79-4000-406D-87AF-BFFB3FC39D57}
626Dim GUID_DSFX_STANDARD_COMPRESSOR = [&Hef011f79, &H4000, &H406d, [&H87, &Haf, &Hbf, &Hfb, &H3f, &Hc3, &H9d, &H57]] As GUID
627
628' Parametric Equalization {120CED89-3BF4-4173-A132-3CB406CF3231}
629Dim GUID_DSFX_STANDARD_PARAMEQ = [&H120ced89, &H3bf4, &H4173, [&Ha1, &H32, &H3c, &Hb4, &H06, &Hcf, &H32, &H31]] As GUID
630
631' I3DL2 Environmental Reverberation: Reverb (Listener) Effect {EF985E71-D5C7-42D4-BA4D-2D073E2E96F4}
632Dim GUID_DSFX_STANDARD_I3DL2REVERB = [&Hef985e71, &Hd5c7, &H42d4, [&Hba, &H4d, &H2d, &H07, &H3e, &H2e, &H96, &Hf4]] As GUID
633
634' Waves Reverberation {87FC0268-9A55-4360-95AA-004A1D9DE26C}
635Dim GUID_DSFX_WAVES_REVERB = [&H87fc0268, &H9a55, &H4360, [&H95, &Haa, &H00, &H4a, &H1d, &H9d, &He2, &H6c]] As GUID
636
637
638#endif '_INC_DSOUND
Note: See TracBrowser for help on using the repository browser.