home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / LordLucifer / win32asm / files / TasmD3DRMdemo.ZIP / tdx61inc.ZIP / Tdsound.inc < prev    next >
Encoding:
Text File  |  1999-08-12  |  15.0 KB  |  418 lines

  1. ; tdsound.inc  (c) Minde  06/08/99 montana@is.lt
  2. ; Content:  TASM DirectSound include file ver. 1.2
  3. ; converted from dsound.h, DX ver. 6.1
  4. ;
  5. ;  Feel free to use or distribute the package, part or whole, for any
  6. ; non-commercial use preferably crediting me.
  7. ;  Also feel free to contact me at the above address if you experience any
  8. ; problems or notice any omissions.
  9.  
  10.  
  11. DirectSoundEnumerate        EQU DirectSoundEnumerateA
  12. DirectSoundCaptureEnumerate EQU DirectSoundCaptureEnumerateA
  13. DirectSoundCreate               PROCDESC STDCALL :DWORD, :DWORD, :DWORD
  14. DirectSoundEnumerateA           PROCDESC STDCALL :DWORD, :DWORD
  15. DirectSoundCaptureCreate        PROCDESC STDCALL :DWORD, :DWORD, :DWORD
  16. DirectSoundCaptureEnumerateA    PROCDESC STDCALL :DWORD, :DWORD
  17.  
  18.  
  19. CLSID_DirectSound               GUID <047d4d946h,062e8h,011cfh,093h,0bch,044h,045h,053h,054h,000h,000h>
  20. CLSID_DirectSoundCapture        GUID <0b0210780h,089cdh,011d0h,0afh,008h,000h,0a0h,0c9h,025h,0cdh,016h>
  21. IID_IDirectSound                GUID <0279AFA83h,04981h,011CEh,0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h>
  22. IID_IDirectSoundBuffer          GUID <0279AFA85h,04981h,011CEh,0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h>
  23. IID_IDirectSound3DListener      GUID <0279AFA84h,04981h,011CEh,0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h>
  24. IID_IDirectSound3DBuffer        GUID <0279AFA86h,04981h,011CEh,0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h>
  25. IID_IDirectSoundCapture         GUID <0b0210781h,089cdh,011d0h,0afh,008h,000h,0a0h,0c9h,025h,0cdh,016h>
  26. IID_IDirectSoundCaptureBuffer   GUID <0b0210782h,089cdh,011d0h,0afh,008h,000h,0a0h,0c9h,025h,0cdh,016h>
  27. IID_IDirectSoundNotify          GUID <0b0210783h,089cdh,011d0h,0afh,008h,000h,0a0h,0c9h,025h,0cdh,016h>
  28. IID_IKsPropertySet              GUID <031efac30h,0515ch,011d0h,0a9h,0aah,000h,0aah,000h,061h,0beh,093h>
  29.  
  30.  
  31. ;=============================================================================
  32. ;               Structures
  33. ;=============================================================================
  34. DSCAPS STRUCT
  35. dscaps_dwSize                          DD ?
  36. dscaps_dwFlags                         DD ?
  37. dscaps_dwMinSecondarySampleRate        DD ?
  38. dscaps_dwMaxSecondarySampleRate        DD ?
  39. dscaps_dwPrimaryBuffers                DD ?
  40. dscaps_dwMaxHwMixingAllBuffers         DD ?
  41. dscaps_dwMaxHwMixingStaticBuffers      DD ?
  42. dscaps_dwMaxHwMixingStreamingBuffers   DD ?
  43. dscaps_dwFreeHwMixingAllBuffers        DD ?
  44. dscaps_dwFreeHwMixingStaticBuffers     DD ?
  45. dscaps_dwFreeHwMixingStreamingBuffers  DD ?
  46. dscaps_dwMaxHw3DAllBuffers             DD ?
  47. dscaps_dwMaxHw3DStaticBuffers          DD ?
  48. dscaps_dwMaxHw3DStreamingBuffers       DD ?
  49. dscaps_dwFreeHw3DAllBuffers            DD ?
  50. dscaps_dwFreeHw3DStaticBuffers         DD ?
  51. dscaps_dwFreeHw3DStreamingBuffers      DD ?
  52. dscaps_dwTotalHwMemBytes               DD ?
  53. dscaps_dwFreeHwMemBytes                DD ?
  54. dscaps_dwMaxContigFreeHwMemBytes       DD ?
  55. dscaps_dwUnlockTransferRateHwBuffers   DD ?
  56. dscaps_dwPlayCpuOverheadSwBuffers      DD ?
  57. dscaps_dwReserved1                     DD ?
  58. dscaps_dwReserved2                     DD ?
  59. DSCAPS ENDS
  60.  
  61. DSBCAPS STRUCT
  62. dsbcaps_dwSize                  DD ?
  63. dsbcaps_dwFlags                 DD ?
  64. dsbcaps_dwBufferBytes           DD ?
  65. dsbcaps_dwUnlockTransferRate    DD ?
  66. dsbcaps_dwPlayCpuOverhead       DD ?
  67. DSBCAPS ENDS            
  68.  
  69. DSBUFFERDESC STRUCT
  70. dsbufferdesc_dwSize              DD ?
  71. dsbufferdesc_dwFlags             DD ?
  72. dsbufferdesc_dwBufferBytes       DD ?
  73. dsbufferdesc_dwReserved          DD ?
  74. dsbufferdesc_lpwfxFormat         DD ? ; pionter to waveformatex
  75. DSBUFFERDESC ENDS
  76.  
  77. ; THIS IS NEEDED FOR STRUCT (see above...)
  78. WAVEFORMATEX STRUCT
  79. wFormatTag          DW ? ; format type  
  80. nChannels           DW ? ; number of channels (i.e. mono, stereo...)
  81. nSamplesPerSec      DD ? ; sample rate
  82. nAvgBytesPerSec     DD ? ; for buffer estimation
  83. nBlockAlign         DW ? ; block size of data
  84. wBitsPerSample      DW ? ; number of bits per sample of mono data
  85. cbSize              DW ? ; the count in bytes of the size of
  86.                     ; extra information (after cbSize)
  87. WAVEFORMATEX ENDS                
  88.  
  89.  
  90.  
  91. DS3DBUFFER STRUCT
  92. ds3dbuffer_dwSize              DD ?
  93. ds3dbuffer_vPosition           D3DVECTOR ?
  94. ds3dbuffer_vVelocity           D3DVECTOR ?
  95. ds3dbuffer_dwInsideConeAngle   DD ?
  96. ds3dbuffer_dwOutsideConeAngle  DD ?
  97. ds3dbuffer_vConeOrientation    D3DVECTOR ?
  98. ds3dbuffer_lConeOutsideVolume  DD ?
  99. ds3dbuffer_flMinDistance       D3DVALUE ?
  100. ds3dbuffer_flMaxDistance       D3DVALUE ?
  101. ds3dbuffer_dwMode              DD ?
  102. DS3DBUFFER ENDS
  103.  
  104. DS3DLISTENER STRUCT
  105. ds3dlistener_dwSize              DD ?
  106. ds3dlistener_vPosition           D3DVECTOR ?
  107. ds3dlistener_vVelocity           D3DVECTOR ?
  108. ds3dlistener_vOrientFront        D3DVECTOR ?
  109. ds3dlistener_vOrientTop          D3DVECTOR ?
  110. ds3dlistener_flDistanceFactor    D3DVALUE ?
  111. ds3dlistener_flRolloffFactor     D3DVALUE ?
  112. ds3dlistener_flDopplerFactor     D3DVALUE ?
  113. DS3DLISTENER ENDS
  114.  
  115. DSCCAPS struct
  116. dsccaps_dwSize          DD ?
  117. dsccaps_dwFlags         DD ?
  118. dsccaps_dwFormats       DD ?
  119. dsccaps_dwChannels      DD ?
  120. DSCCAPS ends
  121.  
  122. DSCBUFFERDESC struct
  123. dscbufferdesc_dwSize          DD ?
  124. dscbufferdesc_dwFlags         DD ?
  125. dscbufferdesc_dwBufferBytes   DD ?
  126. dscbufferdesc_dwReserved      DD ?
  127. dscbufferdesc_lpwfxFormat     DD ?
  128. DSCBUFFERDESC ends
  129.  
  130.  
  131. DSCBCAPS struct
  132. dscbcaps_dwSize          DD ?
  133. dscbcaps_dwFlags         DD ?
  134. dscbcaps_dwBufferBytes   DD ?
  135. dscbcaps_dwReserved      DD ?
  136. DSCBCAPS ends
  137.  
  138. DSBPOSITIONNOTIFY struct
  139. dsbpositionnotify_dwOffset        DD ?
  140. dsbpositionnotify_hEventNotify    DD ?
  141. DSBPOSITIONNOTIFY ends
  142.  
  143.  
  144. ;==============================================================================
  145. ;                               METHODS...
  146. ;==============================================================================
  147.  
  148. ; IDirectSound
  149. ; IUnknown methods               
  150. DSQueryInterface        = 0
  151. DSAddRef                = 4     
  152. DSRelease               = 8 
  153. ; IDirectSound methods           
  154. DSCreateSoundBuffer     = 12
  155. DSGetCaps               = 16
  156. DSDuplicateSoundBuffer  = 20
  157. DSSetCooperativeLevel   = 24
  158. DSCompact               = 28
  159. DSGetSpeakerConfig      = 32    
  160. DSSetSpeakerConfig      = 36
  161. DSInitialize            = 40    
  162.  
  163. ; IDirectSoundBuffer
  164. ; IUnknown methods
  165. DSBQueryInterface       = 0
  166. DSBAddRef               = 4
  167. DSBRelease              = 8
  168. ; IDirectSoundBuffer methods
  169. DSBGetCaps              = 12
  170. DSBGetCurrentPosition   = 16
  171. DSBGetFormat            = 20
  172. DSBGetVolume            = 24
  173. DSBGetPan               = 28
  174. DSBGetFrequency         = 32
  175. DSBGetStatus            = 36
  176. DSBInitialize           = 40
  177. DSBLock                 = 44
  178. DSBPlay                 = 48
  179. DSBSetCurrentPosition   = 52
  180. DSBSetFormat            = 56
  181. DSBSetVolume            = 60
  182. DSBSetPan               = 64
  183. DSBSetFrequency         = 68
  184. DSBStop                 = 72
  185. DSBUnlock               = 76
  186. DSBRestore              = 80
  187.  
  188. ; IDirectSound3DListener
  189. ; IUnknown methods
  190. DS3DLQueryInterface         = 0
  191. DS3DLAddRef                 = 4
  192. DS3DLRelease                = 8
  193. ; IDirectSound3D methods
  194. DS3DLGetAllParameters       = 12
  195. DS3DLGetDistanceFactor      = 16
  196. DS3DLGetDopplerFactor       = 20
  197. DS3DLGetOrientation         = 24
  198. DS3DLGetPosition            = 28
  199. DS3DLGetRolloffFactor       = 32
  200. DS3DLGetVelocity            = 36
  201. DS3DLSetAllParameters       = 40
  202. DS3DLSetDistanceFactor      = 44
  203. DS3DLSetDopplerFactor       = 48
  204. DS3DLSetOrientation         = 52
  205. DS3DLSetPosition            = 56
  206. DS3DLSetRolloffFactor       = 60
  207. DS3DLSetVelocity            = 64
  208. DS3DLCommitDeferredSettings = 68
  209.  
  210. ; IDirectSound3DBuffer
  211. ; IUnknown methods         
  212. DS3DBQueryInterface         = 0
  213. DS3DBAddRef                 = 4
  214. DS3DBRelease                = 8
  215. ; IDirectSoundBuffer3D methods
  216. DS3DBGetAllParameters       = 12
  217. DS3DBGetConeAngles          = 16
  218. DS3DBGetConeOrientation     = 20
  219. DS3DBGetConeOutsideVolume   = 24
  220. DS3DBGetMaxDistance         = 28
  221. DS3DBGetMinDistance         = 32
  222. DS3DBGetMode                = 36
  223. DS3DBGetPosition            = 40
  224. DS3DBGetVelocity            = 44
  225. DS3DBSetAllParameters       = 48
  226. DS3DBSetConeAngles          = 52
  227. DS3DBSetConeOrientation     = 56
  228. DS3DBSetConeOutsideVolume   = 60
  229. DS3DBSetMaxDistance         = 64
  230. DS3DBSetMinDistance         = 68
  231. DS3DBSetMode                = 72
  232. DS3DBSetPosition            = 76
  233. DS3DBSetVelocity            = 80
  234.  
  235.                                         
  236. ; IDirectSoundCapture
  237. ; IUnknown methods         
  238. DSCQueryInterface           = 0
  239. DSCAddRef                   = 4
  240. DSCRelease                  = 8
  241. ; IDirectSoundCapture methods
  242. DSCCreateCaptureBuffer      = 12
  243. DSCGetCaps                  = 16
  244. DSCInitialize               = 20
  245.  
  246.  
  247. ; IDirectSoundCaptureBuffer
  248. ; IUnknown methods         
  249. DSCBQueryInterface          = 0
  250. DSCBAddRef                  = 4
  251. DSCBRelease                 = 8
  252. ; IDirectSoundCaptureBuffer methods
  253. DSCBGetCaps                 = 12
  254. DSCBGetCurrentPosition      = 16     
  255. DSCBGetFormat               = 20
  256. DSCBGetStatus               = 24
  257. DSCBInitialize              = 28
  258. DSCBLock                    = 32
  259. DSCBStart                   = 36
  260. DSCBStop                    = 40
  261. DSCBUnlock                  = 44
  262.  
  263.  
  264. ; IDirectSoundNotify
  265. ; IUnknown methods         
  266. DSNQueryInterface           = 0
  267. DSNAddRef                   = 4
  268. DSNRelease                  = 8
  269. ; IDirectSoundNotify methods
  270. DSNSetNotificationPositions = 12
  271.  
  272.  
  273. ; IKsPropertySet
  274. ; IUnknown methods         
  275. KSPSQueryInterface           = 0
  276. KSPSAddRef                   = 4
  277. KSPSRelease                  = 8
  278. ; IKsPropertySet methods 
  279. KSPSGet                     = 12
  280. KSPSSet                     = 16
  281. KSPSQuerySupport            = 20
  282.  
  283. KSPROPERTY_SUPPORT_GET = 00000001h;
  284. KSPROPERTY_SUPPORT_SET = 00000002h;
  285.  
  286.  
  287.  
  288. ;============================================================================== 
  289. ;                           Return Codes, Errors ...
  290. ;==============================================================================
  291.  
  292. DS_OK                   EQU 0
  293. DSERR_ALLOCATED         EQU 88780000h+10; The call failed because resources (such as a priority level) were already being used by another caller.
  294. DSERR_CONTROLUNAVAIL    EQU 88780000h+30; The control (vol,pan,etc.) requested by the caller is not available.
  295. DSERR_INVALIDPARAM      EQU E_INVALIDARG; An invalid parameter was passed to the returning function
  296. DSERR_INVALIDCALL       EQU 88780000h+50; This call is not valid for the current state of this object
  297. DSERR_GENERIC           EQU E_FAIL  ; An undetermined error occured inside the DSound subsystem
  298. DSERR_PRIOLEVELNEEDED   EQU 88780000h+70; The caller does not have the priority level required for the function to succeed.
  299. DSERR_OUTOFMEMORY       EQU E_OUTOFMEMORY; The DSound subsystem couldn't allocate sufficient memory to complete the caller's request.
  300. DSERR_BADFORMAT         EQU 88780000h+100; The specified WAVE format is not supported
  301. DSERR_UNSUPPORTED       EQU E_NOTIMPL   ; The function called is not supported at this time
  302. DSERR_NODRIVER          EQU 88780000h+120; No sound driver is available for use
  303. DSERR_ALREADYINITIALIZED EQU 88780000h+130; This object is already initialized
  304. DSERR_NOAGGREGATION     EQU CLASS_E_NOAGGREGATION; This object does not support aggregation
  305. DSERR_BUFFERLOST        EQU 88780000h+150; The buffer memory has been lost, and must be Restored.
  306. DSERR_OTHERAPPHASPRIO   EQU 88780000h+160; Another app has a higher priority level, preventing this call from
  307. DSERR_UNINITIALIZED     EQU 88780000h+170; The Initialize() member on the Direct Sound Object has not been called or called successfully before calls to other members.
  308. DSERR_NOINTERFACE = E_NOINTERFACE;
  309.  
  310.  
  311. ;==========================================================================;
  312. ;                                Flags...
  313. ;==========================================================================;
  314.  
  315. DSCAPS_PRIMARYMONO      EQU 000000001h
  316. DSCAPS_PRIMARYSTEREO    EQU 000000002h
  317. DSCAPS_PRIMARY8BIT      EQU 000000004h
  318. DSCAPS_PRIMARY16BIT     EQU 000000008h
  319. DSCAPS_CONTINUOUSRATE   EQU 000000010h
  320. DSCAPS_EMULDRIVER       EQU 000000020h
  321. DSCAPS_CERTIFIED        EQU 000000040h
  322. DSCAPS_SECONDARYMONO    EQU 000000100h
  323. DSCAPS_SECONDARYSTEREO  EQU 000000200h
  324. DSCAPS_SECONDARY8BIT    EQU 000000400h
  325. DSCAPS_SECONDARY16BIT   EQU 000000800h
  326.  
  327. DSBPLAY_LOOPING         EQU 000000001h
  328.  
  329. DSBSTATUS_PLAYING       EQU 000000001h
  330. DSBSTATUS_BUFFERLOST    EQU 000000002h
  331. DSBSTATUS_LOOPING       EQU 000000004h
  332.  
  333. DSBLOCK_FROMWRITECURSOR EQU 000000001h
  334. DSBLOCK_ENTIREBUFFER    EQU 000000002h
  335.  
  336. DSSCL_NORMAL            EQU 1
  337. DSSCL_PRIORITY          EQU 2
  338. DSSCL_EXCLUSIVE         EQU 3
  339. DSSCL_WRITEPRIMARY      EQU 4
  340.  
  341. DS3DMODE_NORMAL         EQU 0
  342. DS3DMODE_HEADRELATIVE   EQU 1
  343. DS3DMODE_DISABLE        EQU 2
  344.  
  345. DS3D_IMMEDIATE          EQU 0
  346. DS3D_DEFERRED           EQU 1
  347.  
  348. DS3D_MINDISTANCEFACTOR      EQU <0.0f>
  349. DS3D_MAXDISTANCEFACTOR      EQU <10.0f>
  350. DS3D_DEFAULTDISTANCEFACTOR  EQU <1.0f>
  351.  
  352. DS3D_MINROLLOFFFACTOR       EQU <0.0f>
  353. DS3D_MAXROLLOFFFACTOR       EQU <10.0f>
  354. DS3D_DEFAULTROLLOFFFACTOR   EQU <1.0f>
  355.  
  356. DS3D_MINDOPPLERFACTOR       EQU <0.0f>
  357. DS3D_MAXDOPPLERFACTOR       EQU <10.0f>
  358. DS3D_DEFAULTDOPPLERFACTOR   EQU <1.0f>
  359.  
  360. DS3D_DEFAULTMINDISTANCE     EQU <1.0f>
  361. DS3D_DEFAULTMAXDISTANCE     EQU <1000000000.0f>
  362.  
  363. DS3D_MINCONEANGLE               = 0
  364. DS3D_MAXCONEANGLE               = 360
  365. DS3D_DEFAULTCONEANGLE           = 360
  366. DS3D_DEFAULTCONEOUTSIDEVOLUME   = 0
  367.  
  368.  
  369.  
  370. DSBCAPS_PRIMARYBUFFER       EQU 000000001h
  371. DSBCAPS_STATIC              EQU 000000002h
  372. DSBCAPS_LOCHARDWARE         EQU 000000004h
  373. DSBCAPS_LOCSOFTWARE         EQU 000000008h
  374. DSBCAPS_CTRL3D              EQU 000000010h
  375. DSBCAPS_CTRLFREQUENCY       EQU 000000020h
  376. DSBCAPS_CTRLPAN             EQU 000000040h
  377. DSBCAPS_CTRLVOLUME          EQU 000000080h
  378. DSBCAPS_CTRLDEFAULT         EQU 0000000E0h ; Pan + volume + frequency.
  379. DSBCAPS_CTRLALL             EQU 0000000F0h ; All control capabilities
  380. DSBCAPS_STICKYFOCUS         EQU 000004000h
  381. DSBCAPS_GLOBALFOCUS         EQU 000008000h
  382. DSBCAPS_GETCURRENTPOSITION2 EQU 000010000h ; More accurate play cursor under emulation
  383. DSBCAPS_MUTE3DATMAXDISTANCE EQU 000020000h
  384.  
  385. DSCBCAPS_WAVEMAPPED         EQU 080000000h
  386.  
  387. DSSPEAKER_HEADPHONE     EQU 1
  388. DSSPEAKER_MONO          EQU 2
  389. DSSPEAKER_QUAD          EQU 3
  390. DSSPEAKER_STEREO        EQU 4
  391. DSSPEAKER_SURROUND      EQU 5
  392.  
  393. DSSPEAKER_GEOMETRY_MIN     = 00000005h;   5 degrees
  394. DSSPEAKER_GEOMETRY_NARROW  = 0000000Ah;  10 degrees
  395. DSSPEAKER_GEOMETRY_WIDE    = 00000014h;  20 degrees
  396. DSSPEAKER_GEOMETRY_MAX     = 000000B4h; 180 degrees
  397.  
  398. DSCCAPS_EMULDRIVER          = 00000020h;
  399. DSCBLOCK_ENTIREBUFFER       = 00000001h;
  400. DSCBSTATUS_CAPTURING        = 00000001h;
  401. DSCBSTATUS_LOOPING          = 00000002h;
  402. DSCBSTART_LOOPING           = 00000001h;
  403. DSBFREQUENCY_MIN            = 100;
  404. DSBFREQUENCY_MAX            = 100000;
  405. DSBFREQUENCY_ORIGINAL       = 0;
  406. DSBPAN_LEFT                 = -10000;
  407. DSBPAN_CENTER               = 0;
  408. DSBPAN_RIGHT                = 10000;
  409. DSBVOLUME_MIN               = -10000;
  410. DSBVOLUME_MAX               = 0;
  411. DSBSIZE_MIN                 = 4;
  412. DSBSIZE_MAX                 = 0FFFFFFFh;
  413. DSBPN_OFFSETSTOP            = DWORD (-1)
  414.  
  415.  
  416.  
  417. ;end of file
  418.