source: trunk/ab5.0/ablib/src/directx9/dsound.sbp

Last change on this file was 497, checked in by イグトランス (egtra), 16 years ago

インクルードガードとその他不要な前処理定義などの削除

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