Leaked source code of windows server 2003
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.

220 lines
7.8 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. ////
  23. // acm.h - interface for acm functions in acm.c
  24. ////
  25. #ifndef __ACM_H__
  26. #define __ACM_H__
  27. #include "winlocal.h"
  28. #include "wavfmt.h"
  29. #define ACM_VERSION 0x00000106
  30. // <dwFlags> values in AcmInit
  31. //
  32. #define ACM_NOACM 0x00000001
  33. // <dwFlags> values in AcmFormatChoose
  34. //
  35. #define ACM_FORMATPLAY 0x00001000
  36. #define ACM_FORMATRECORD 0x00002000
  37. // <dwFlags> values in AcmConvertInit
  38. //
  39. #define ACM_NONREALTIME 0x00000010
  40. #define ACM_QUERY 0x00000020
  41. // handle to acm engine returned from AcmInit
  42. //
  43. DECLARE_HANDLE32(HACM);
  44. // handle to acm driver returned from AcmDriverLoad
  45. //
  46. DECLARE_HANDLE32(HACMDRV);
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif
  50. // AcmInit - initialize audio compression manager engine
  51. // <dwVersion> (i) must be ACM_VERSION
  52. // <hInst> (i) instance handle of calling module
  53. // <dwFlags> (i) control flags
  54. #ifdef AVPCM
  55. // ACM_NOACM use internal pcm engine rather than acm
  56. #endif
  57. // return handle (NULL if error)
  58. //
  59. HACM DLLEXPORT WINAPI AcmInit(DWORD dwVersion, HINSTANCE hInst, DWORD dwFlags);
  60. // AcmTerm - shut down audio compression manager engine
  61. // <hAcm> (i) handle returned from AcmInit
  62. // return 0 if success
  63. //
  64. int DLLEXPORT WINAPI AcmTerm(HACM hAcm);
  65. // AcmFormatGetSizeMax - get size of largest acm WAVEFORMATEX struct
  66. // <hAcm> (i) handle returned from AcmInit
  67. //
  68. // return size of largest format struct, -1 if error
  69. //
  70. int DLLEXPORT WINAPI AcmFormatGetSizeMax(HACM hAcm);
  71. // AcmFormatChoose - choose audio format from dialog box
  72. // <hAcm> (i) handle returned from AcmInit
  73. // <hwndOwner> (i) owner of dialog box
  74. // NULL no owner
  75. // <lpszTitle> (i) title of the dialog box
  76. // NULL use default title ("Sound Selection")
  77. // <lpwfx> (i) initialize dialog with this format
  78. // NULL no initial format
  79. // <dwFlags> (i) control flags
  80. // ACM_FORMATPLAY restrict choices to playback formats
  81. // ACM_FORMATRECORD restrict choices to recording formats
  82. // return pointer to chosen format, NULL if error or none chosen
  83. //
  84. // NOTE: the format structure returned is dynamically allocated.
  85. // Use WavFormatFree() to free the buffer.
  86. //
  87. #define AcmFormatChoose(hAcm, hwndOwner, lpszTitle, lpwfx, dwFlags) \
  88. AcmFormatChooseEx(hAcm, hwndOwner, lpszTitle, lpwfx, dwFlags)
  89. LPWAVEFORMATEX DLLEXPORT WINAPI AcmFormatChooseEx(HACM hAcm,
  90. HWND hwndOwner, LPCTSTR lpszTitle, LPWAVEFORMATEX lpwfx, DWORD dwFlags);
  91. // AcmFormatSuggest - suggest a new format
  92. // <hAcm> (i) handle returned from AcmInit
  93. // <lpwfxSrc> (i) source format
  94. // <nFormatTag> (i) suggested format must match this format tag
  95. // -1 suggestion need not match
  96. // <nSamplesPerSec> (i) suggested format must match this sample rate
  97. // -1 suggestion need not match
  98. // <nBitsPerSample> (i) suggested format must match this sample size
  99. // -1 suggestion need not match
  100. // <nChannels> (i) suggested format must match this channels
  101. // -1 suggestion need not match
  102. // <dwFlags> (i) control flags
  103. // 0 reserved; must be zero
  104. // return pointer to suggested format, NULL if error
  105. //
  106. // NOTE: the format structure returned is dynamically allocated.
  107. // Use WavFormatFree() to free the buffer.
  108. //
  109. #define AcmFormatSuggest(hAcm, lpwfxSrc, nFormatTag, nSamplesPerSec, \
  110. nBitsPerSample, nChannels, dwFlags) \
  111. AcmFormatSuggestEx(hAcm, lpwfxSrc, nFormatTag, nSamplesPerSec, \
  112. nBitsPerSample, nChannels, dwFlags)
  113. LPWAVEFORMATEX DLLEXPORT WINAPI AcmFormatSuggestEx(HACM hAcm,
  114. LPWAVEFORMATEX lpwfxSrc, long nFormatTag, long nSamplesPerSec,
  115. int nBitsPerSample, int nChannels, DWORD dwFlags);
  116. // AcmFormatGetText - get text describing the specified format
  117. // <hAcm> (i) handle returned from AcmInit
  118. // <lpwfx> (i) format
  119. // <lpszText> (o) buffer to hold text
  120. // <sizText> (i) size of buffer, in characters
  121. // <dwFlags> (i) control flags
  122. // 0 reserved; must be zero
  123. // return 0 if success
  124. //
  125. int DLLEXPORT WINAPI AcmFormatGetText(HACM hAcm, LPWAVEFORMATEX lpwfx,
  126. LPTSTR lpszText, int sizText, DWORD dwFlags);
  127. // AcmConvertInit - initialize acm conversion engine
  128. // <hAcm> (i) handle returned from AcmInit
  129. // <lpwfxSrc> (i) pointer to source WAVEFORMATEX struct
  130. // <lpwfxDst> (i) pointer to destination WAVEFORMATEX struct
  131. // <lpwfltr> (i) pointer to WAVEFILTER struct
  132. // NULL reserved; must be NULL
  133. // <dwFlags> (i) control flags
  134. // ACM_NONREALTIME realtime conversion conversion not required
  135. // ACM_QUERY return 0 if conversion would be supported
  136. // return 0 if success
  137. //
  138. int DLLEXPORT WINAPI AcmConvertInit(HACM hAcm, LPWAVEFORMATEX lpwfxSrc,
  139. LPWAVEFORMATEX lpwfxDst, LPWAVEFILTER lpwfltr, DWORD dwFlags);
  140. // AcmConvertTerm - shut down acm conversion engine
  141. // <hAcm> (i) handle returned from AcmInit
  142. // return 0 if success
  143. //
  144. int DLLEXPORT WINAPI AcmConvertTerm(HACM hAcm);
  145. // AcmConvertGetSizeSrc - calculate source buffer size
  146. // <hAcm> (i) handle returned from AcmInit
  147. // <sizBufDst> (i) size of destination buffer in bytes
  148. // return source buffer size, -1 if error
  149. //
  150. long DLLEXPORT WINAPI AcmConvertGetSizeSrc(HACM hAcm, long sizBufDst);
  151. // AcmConvertGetSizeDst - calculate destination buffer size
  152. // <hAcm> (i) handle returned from AcmInit
  153. // <sizBufSrc> (i) size of source buffer in bytes
  154. // return destination buffer size, -1 if error
  155. //
  156. long DLLEXPORT WINAPI AcmConvertGetSizeDst(HACM hAcm, long sizBufSrc);
  157. // AcmConvert - convert wav data from one format to another
  158. // <hAcm> (i) handle returned from AcmInit
  159. // <hpBufSrc> (i) buffer containing bytes to reformat
  160. // <sizBufSrc> (i) size of buffer in bytes
  161. // <hpBufDst> (o) buffer to contain new format
  162. // <sizBufDst> (i) size of buffer in bytes
  163. // <dwFlags> (i) control flags
  164. // 0 reserved; must be zero
  165. // return count of bytes in destination buffer (-1 if error)
  166. //
  167. // NOTE: the destination buffer must be large enough to hold the result
  168. //
  169. long DLLEXPORT WINAPI AcmConvert(HACM hAcm,
  170. void _huge *hpBufSrc, long sizBufSrc,
  171. void _huge *hpBufDst, long sizBufDst,
  172. DWORD dwFlags);
  173. // AcmDriverLoad - load an acm driver for use by this process
  174. // <hAcm> (i) handle returned from AcmInit
  175. // <wMid> (i) manufacturer id
  176. // <wPid> (i) product id
  177. // <lpszDriver> (i) name of driver module
  178. // <lpszDriverProc> (i) name of driver proc function
  179. // <dwFlags> (i) control flags
  180. // 0 reserved; must be zero
  181. // return handle (NULL if error)
  182. //
  183. HACMDRV DLLEXPORT WINAPI AcmDriverLoad(HACM hAcm, WORD wMid, WORD wPid,
  184. LPTSTR lpszDriver, LPSTR lpszDriverProc, DWORD dwFlags);
  185. // AcmDriverUnload - unload an acm driver
  186. // <hAcm> (i) handle returned from AcmInit
  187. // <hAcmDrv> (i) handle returned from AcmDriverLoad
  188. // return 0 if success
  189. //
  190. int DLLEXPORT WINAPI AcmDriverUnload(HACM hAcm, HACMDRV hAcmDrv);
  191. #ifdef __cplusplus
  192. }
  193. #endif
  194. #endif // __ACM_H__