Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

229 lines
5.4 KiB

  1. ;
  2. ;DSVXD.INC
  3. ;
  4. ;Include file for HAL and HEL VXD layers
  5. ;
  6. ;
  7. ;Return byte count to caller
  8. ;
  9. ;Do not use ESI as parameter!
  10. ;
  11. OUTCNT MACRO RetCnt
  12. LOCAL exit
  13. push esi
  14. mov esi,IOCTL_parms
  15. mov esi,[esi].lpcbBytesReturned
  16. or esi,esi
  17. jz exit
  18. mov DWORD PTR [esi],RetCnt
  19. exit: pop esi
  20. ENDM
  21. ;
  22. ;Return 4-byte DWORD to caller
  23. ;
  24. ;Do not use ESI as parameter!
  25. ;
  26. OUTDWORD MACRO RetVal
  27. LOCAL exit
  28. push esi
  29. mov esi,IOCTL_parms
  30. mov esi,[esi].lpvOutBuffer
  31. or esi,esi
  32. jz exit
  33. mov DWORD PTR [esi],RetVal
  34. OUTCNT 4
  35. exit: pop esi
  36. ENDM
  37. ;
  38. ;Read 4-byte DWORD from caller
  39. ;
  40. ;Do not use ESI as parameter!
  41. ;
  42. INDWORD MACRO RetVal
  43. LOCAL exit
  44. push esi
  45. mov esi,IOCTL_parms
  46. mov esi,[esi].lpvInBuffer
  47. mov RetVal,-1
  48. or esi,esi
  49. jz exit
  50. mov RetVal,DWORD PTR [esi]
  51. exit: pop esi
  52. ENDM
  53. ;
  54. ;String copy/write macros
  55. ;
  56. REP_MOVSB MACRO
  57. push ecx
  58. and ecx,3
  59. rep movsb
  60. pop ecx
  61. shr ecx,2
  62. rep movsd
  63. ENDM
  64. REP_STOSB MACRO
  65. push ecx
  66. and ecx,3
  67. rep stosb
  68. pop ecx
  69. shr ecx,2
  70. rep stosd
  71. ENDM
  72. ;
  73. ;Scale definition
  74. ;
  75. DS_SCALE_MAX equ 65535
  76. DS_SCALE_MID equ 32768
  77. ;
  78. ;Error codes
  79. ;
  80. HAL_OK equ 0
  81. HAL_ERROR equ 1
  82. HAL_CANT_OPEN_VXD equ 2
  83. HAL_ALLOC_FAILED equ 3
  84. HAL_NOT_ALLOCATED equ 4
  85. HAL_MUST_STOP_FIRST equ 5
  86. HAL_SYSALLOCMEM equ 11
  87. ;
  88. ;Base mode flag equates
  89. ; Note: This file is generated by modeflag.m4
  90. ;
  91. ;HALHWMODE afAbilityFlags values
  92. ;
  93. ;These flags describe dynamic capabilities (what the device
  94. ;can/cannot do)
  95. ;
  96. A_CAN_CHANGE_VOLUME equ 00000001b ;Can change volume while playing
  97. A_CANNOT_CHANGE_VOLUME equ 00000000b ;Cannot change volume while playing
  98. A_CAN_CHANGE_MODE equ 00000010b ;Can change PCM mode while playing
  99. A_CANNOT_CHANGE_MODE equ 00000000b ;Cannot change PCM mode while playing
  100. A_CAN_CHANGE_RATE equ 00000100b ;Can change rate while playing
  101. A_CANNOT_CHANGE_RATE equ 00000000b ;Cannot change rate while playing
  102. A_CAN_LOOP_SECONDARY equ 00001000b ;Can loop secondary buffers before starting
  103. A_CANNOT_LOOP_SECONDARY equ 00000000b ;Cannot loop secondary buffers before starting
  104. A_CAN_UNLOOP_SECONDARY equ 00010000b ;Secondary bufers do not have to loop
  105. A_CANNOT_UNLOOP_SECONDARY equ 00000000b ;Secondary buffers must always loop
  106. A_CAN_CHANGE_LOOP_STATUS equ 00100000b ;Can turn looping on/off during playback
  107. A_CANNOT_CHANGE_LOOP_STATUS equ 00000000b ;Cannot turn looping on/off during playback
  108. ;
  109. ;HALSTRBUF.dwFlags values
  110. ;
  111. HSB_DMA_ALLOC equ 1h ;Buffer was allocated from DMA services
  112. HSB_RAM_ALLOC equ 2h ;Buffer was allocated from sound card RAM
  113. ;
  114. ;
  115. ;Passed to HAL_ChangeStreamFormat() to inhibit parameter
  116. ;change
  117. ;
  118. HF_NO_CHANGE equ -1
  119. ;
  120. ;DSound Caps
  121. ;
  122. DSC_LOCK_SYSMEM equ 65535
  123. DSC_LOCK_SLOW equ 64
  124. DSC_PLAY_DMA equ 20
  125. DSC_PLAY_ONBOARD equ 0
  126. DSC_CAPSF_MONO equ 1
  127. DSC_CAPSF_STEREO equ 2
  128. DSC_CAPSF_8BIT equ 4
  129. DSC_CAPSF_16BIT equ 8
  130. ;
  131. ;Stream buffer descriptor
  132. ;
  133. HALSTRBUF STRUCT
  134. hfFormat DWORD ?
  135. dwSampleRate DWORD ?
  136. dwUserSampleRate DWORD ?
  137. dwVolume DWORD ?
  138. dwPan DWORD ?
  139. dwLVolume DWORD ?
  140. dwRVolume DWORD ?
  141. dwMVolume DWORD ?
  142. HALSTRBUF ENDS
  143. ;
  144. ;Mix session descriptor
  145. ;
  146. MIXSESSION STRUCT
  147. lpBuildBuffer DWORD ?
  148. dwBuildSize DWORD ?
  149. HALOutStrBuf HALSTRBUF <>
  150. pBuffer DWORD ?
  151. cbBuffer DWORD ?
  152. nOutputBytes DWORD ?
  153. MIXSESSION ENDS
  154. ;
  155. ;Mixer input descriptor
  156. ;
  157. MIXERINPUT STRUCT
  158. HALInStrBuf HALSTRBUF <>
  159. pBuffer DWORD ?
  160. cbBuffer DWORD ?
  161. lpdwInputPos DWORD ?
  162. dwInputBytes DWORD ?
  163. dwOutputOffset DWORD ?
  164. MIXERINPUT ENDS
  165. ; VxD ID registered to DSHEL.VXD
  166. DSOUND_Device_ID EQU 357Eh
  167. ifdef DDB_Sys_Crit_Init_Done
  168. ; DSound Driver VxDs use this service to
  169. Begin_Service_Table DSOUND
  170. DSOUND_Service _DSOUND_GetVersion, LOCAL
  171. DSOUND_Service _DSOUND_RegisterDeviceDriver, VxD_CODE
  172. DSOUND_Service _DSOUND_DeregisterDeviceDriver, VxD_CODE
  173. DSOUND_Service _DSOUND_DD_IOCTL, VxD_CODE
  174. End_Service_Table DSOUND
  175. ENDIF ; DDB_Sys_Crit_Init_Done (VxD's only)