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.

1983 lines
58 KiB

  1. //==========================================================================;
  2. //
  3. // msacm.h
  4. //
  5. // Copyright (c) 1992-1994 Microsoft Corporation. All Rights Reserved.
  6. //
  7. // Description:
  8. // Audio Compression Manager Public Header File
  9. //
  10. // History:
  11. //
  12. //==========================================================================;
  13. #ifndef _INC_ACM
  14. #define _INC_ACM /* #defined if msacm.h has been included */
  15. #if !defined(_INC_MMREG) || (_INC_MMREG < 142)
  16. #ifndef RC_INVOKED
  17. #error MMREG.H version 142 or greater to be included first
  18. #endif
  19. #endif
  20. #if defined(WIN32) && !defined(_WIN32)
  21. #ifndef RC_INVOKED
  22. #pragma message("MSACM.H: defining _WIN32 because application defined WIN32")
  23. #endif
  24. #define _WIN32
  25. #endif
  26. #if defined(UNICODE) && !defined(_UNICODE)
  27. #ifndef RC_INVOKED
  28. #pragma message("MSACM.H: defining _UNICODE because application defined UNICODE")
  29. #endif
  30. #define _UNICODE
  31. #endif
  32. #ifndef RC_INVOKED
  33. #pragma pack(1) /* Assume byte packing throughout */
  34. #endif /* RC_INVOKED */
  35. #ifdef __cplusplus
  36. extern "C" { /* Assume C declarations for C++ */
  37. #endif /* __cplusplus */
  38. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  39. //
  40. //
  41. //
  42. //
  43. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  44. #ifndef DRV_MAPPER_PREFERRED_INPUT_GET
  45. #define DRV_MAPPER_PREFERRED_INPUT_GET (DRV_USER + 0)
  46. #endif
  47. #ifndef DRV_MAPPER_PREFERRED_OUTPUT_GET
  48. #define DRV_MAPPER_PREFERRED_OUTPUT_GET (DRV_USER + 2)
  49. #endif
  50. #ifndef DRVM_MAPPER_STATUS
  51. #define DRVM_MAPPER_STATUS (0x2000)
  52. #endif
  53. #ifndef WIDM_MAPPER_STATUS
  54. #define WIDM_MAPPER_STATUS (DRVM_MAPPER_STATUS + 0)
  55. #define WAVEIN_MAPPER_STATUS_DEVICE 0
  56. #define WAVEIN_MAPPER_STATUS_MAPPED 1
  57. #define WAVEIN_MAPPER_STATUS_FORMAT 2
  58. #endif
  59. #ifndef WODM_MAPPER_STATUS
  60. #define WODM_MAPPER_STATUS (DRVM_MAPPER_STATUS + 0)
  61. #define WAVEOUT_MAPPER_STATUS_DEVICE 0
  62. #define WAVEOUT_MAPPER_STATUS_MAPPED 1
  63. #define WAVEOUT_MAPPER_STATUS_FORMAT 2
  64. #endif
  65. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  66. //
  67. //
  68. //
  69. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  70. #ifdef _WIN32
  71. #define ACMAPI WINAPI
  72. #else
  73. #ifdef _WINDLL
  74. #define ACMAPI _far _pascal _loadds
  75. #else
  76. #define ACMAPI _far _pascal
  77. #endif
  78. #endif
  79. //--------------------------------------------------------------------------;
  80. //
  81. // ACM General API's and Defines
  82. //
  83. //
  84. //
  85. //
  86. //--------------------------------------------------------------------------;
  87. //
  88. // there are four types of 'handles' used by the ACM. the first three
  89. // are unique types that define specific objects:
  90. //
  91. // HACMDRIVERID: used to _identify_ an ACM driver. this identifier can be
  92. // used to _open_ the driver for querying details, etc about the driver.
  93. //
  94. // HACMDRIVER: used to manage a driver (codec, filter, etc). this handle
  95. // is much like a handle to other media drivers--you use it to send
  96. // messages to the converter, query for capabilities, etc.
  97. //
  98. // HACMSTREAM: used to manage a 'stream' (conversion channel) with the
  99. // ACM. you use a stream handle to convert data from one format/type
  100. // to another--much like dealing with a file handle.
  101. //
  102. //
  103. // the fourth handle type is a generic type used on ACM functions that
  104. // can accept two or more of the above handle types (for example the
  105. // acmMetrics and acmDriverID functions).
  106. //
  107. // HACMOBJ: used to identify ACM objects. this handle is used on functions
  108. // that can accept two or more ACM handle types.
  109. //
  110. DECLARE_HANDLE(HACMDRIVERID);
  111. typedef HACMDRIVERID *PHACMDRIVERID;
  112. typedef HACMDRIVERID FAR *LPHACMDRIVERID;
  113. DECLARE_HANDLE(HACMDRIVER);
  114. typedef HACMDRIVER *PHACMDRIVER;
  115. typedef HACMDRIVER FAR *LPHACMDRIVER;
  116. DECLARE_HANDLE(HACMSTREAM);
  117. typedef HACMSTREAM *PHACMSTREAM;
  118. typedef HACMSTREAM FAR *LPHACMSTREAM;
  119. DECLARE_HANDLE(HACMOBJ);
  120. typedef HACMOBJ *PHACMOBJ;
  121. typedef HACMOBJ FAR *LPHACMOBJ;
  122. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  123. //
  124. // ACM Error Codes
  125. //
  126. // Note that these error codes are specific errors that apply to the ACM
  127. // directly--general errors are defined as MMSYSERR_*.
  128. //
  129. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  130. #ifndef _MMRESULT_
  131. #define _MMRESULT_
  132. typedef UINT MMRESULT;
  133. #endif
  134. #define ACMERR_BASE (512)
  135. #define ACMERR_NOTPOSSIBLE (ACMERR_BASE + 0)
  136. #define ACMERR_BUSY (ACMERR_BASE + 1)
  137. #define ACMERR_UNPREPARED (ACMERR_BASE + 2)
  138. #define ACMERR_CANCELED (ACMERR_BASE + 3)
  139. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  140. //
  141. // ACM Window Messages
  142. //
  143. // These window messages are sent by the ACM or ACM drivers to notify
  144. // applications of events.
  145. //
  146. // Note that these window message numbers will also be defined in
  147. // mmsystem.
  148. //
  149. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  150. #define MM_ACM_OPEN (MM_STREAM_OPEN) // conversion callback messages
  151. #define MM_ACM_CLOSE (MM_STREAM_CLOSE)
  152. #define MM_ACM_DONE (MM_STREAM_DONE)
  153. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  154. //
  155. // acmGetVersion()
  156. //
  157. // the ACM version is a 32 bit number that is broken into three parts as
  158. // follows:
  159. //
  160. // bits 24 - 31: 8 bit _major_ version number
  161. // bits 16 - 23: 8 bit _minor_ version number
  162. // bits 0 - 15: 16 bit build number
  163. //
  164. // this is then displayed as follows:
  165. //
  166. // bMajor = (BYTE)(dwVersion >> 24)
  167. // bMinor = (BYTE)(dwVersion >> 16) &
  168. // wBuild = LOWORD(dwVersion)
  169. //
  170. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  171. DWORD ACMAPI acmGetVersion
  172. (
  173. void
  174. );
  175. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  176. //
  177. // acmMetrics()
  178. //
  179. //
  180. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  181. MMRESULT ACMAPI acmMetrics
  182. (
  183. HACMOBJ hao,
  184. UINT uMetric,
  185. LPVOID pMetric
  186. );
  187. #define ACM_METRIC_COUNT_DRIVERS 1
  188. #define ACM_METRIC_COUNT_CODECS 2
  189. #define ACM_METRIC_COUNT_CONVERTERS 3
  190. #define ACM_METRIC_COUNT_FILTERS 4
  191. #define ACM_METRIC_COUNT_DISABLED 5
  192. #define ACM_METRIC_COUNT_HARDWARE 6
  193. #define ACM_METRIC_COUNT_LOCAL_DRIVERS 20
  194. #define ACM_METRIC_COUNT_LOCAL_CODECS 21
  195. #define ACM_METRIC_COUNT_LOCAL_CONVERTERS 22
  196. #define ACM_METRIC_COUNT_LOCAL_FILTERS 23
  197. #define ACM_METRIC_COUNT_LOCAL_DISABLED 24
  198. #define ACM_METRIC_HARDWARE_WAVE_INPUT 30
  199. #define ACM_METRIC_HARDWARE_WAVE_OUTPUT 31
  200. #define ACM_METRIC_MAX_SIZE_FORMAT 50
  201. #define ACM_METRIC_MAX_SIZE_FILTER 51
  202. #define ACM_METRIC_DRIVER_SUPPORT 100
  203. #define ACM_METRIC_DRIVER_PRIORITY 101
  204. //--------------------------------------------------------------------------;
  205. //
  206. // ACM Drivers
  207. //
  208. //
  209. //
  210. //
  211. //--------------------------------------------------------------------------;
  212. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  213. //
  214. // acmDriverEnum()
  215. //
  216. //
  217. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  218. typedef BOOL (CALLBACK *ACMDRIVERENUMCB)
  219. (
  220. HACMDRIVERID hadid,
  221. DWORD dwInstance,
  222. DWORD fdwSupport
  223. );
  224. MMRESULT ACMAPI acmDriverEnum
  225. (
  226. ACMDRIVERENUMCB fnCallback,
  227. DWORD dwInstance,
  228. DWORD fdwEnum
  229. );
  230. #define ACM_DRIVERENUMF_NOLOCAL 0x40000000L
  231. #define ACM_DRIVERENUMF_DISABLED 0x80000000L
  232. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  233. //
  234. // acmDriverID()
  235. //
  236. //
  237. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  238. MMRESULT ACMAPI acmDriverID
  239. (
  240. HACMOBJ hao,
  241. LPHACMDRIVERID phadid,
  242. DWORD fdwDriverID
  243. );
  244. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  245. //
  246. // acmDriverAdd()
  247. //
  248. //
  249. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  250. #ifdef _WIN32
  251. MMRESULT ACMAPI acmDriverAddA
  252. (
  253. LPHACMDRIVERID phadid,
  254. HINSTANCE hinstModule,
  255. LPARAM lParam,
  256. DWORD dwPriority,
  257. DWORD fdwAdd
  258. );
  259. MMRESULT ACMAPI acmDriverAddW
  260. (
  261. LPHACMDRIVERID phadid,
  262. HINSTANCE hinstModule,
  263. LPARAM lParam,
  264. DWORD dwPriority,
  265. DWORD fdwAdd
  266. );
  267. #ifdef _UNICODE
  268. #define acmDriverAdd acmDriverAddW
  269. #else
  270. #define acmDriverAdd acmDriverAddA
  271. #endif
  272. #else
  273. MMRESULT ACMAPI acmDriverAdd
  274. (
  275. LPHACMDRIVERID phadid,
  276. HINSTANCE hinstModule,
  277. LPARAM lParam,
  278. DWORD dwPriority,
  279. DWORD fdwAdd
  280. );
  281. #endif
  282. #define ACM_DRIVERADDF_FUNCTION 0x00000003L // lParam is a procedure
  283. #define ACM_DRIVERADDF_NOTIFYHWND 0x00000004L // lParam is notify hwnd
  284. #define ACM_DRIVERADDF_TYPEMASK 0x00000007L // driver type mask
  285. #define ACM_DRIVERADDF_LOCAL 0x00000000L // is local to current task
  286. #define ACM_DRIVERADDF_GLOBAL 0x00000008L // is global
  287. //
  288. // prototype for ACM driver procedures that are installed as _functions_
  289. // or _notifations_ instead of as a standalone installable driver.
  290. //
  291. typedef LRESULT (CALLBACK *ACMDRIVERPROC)(DWORD, HACMDRIVERID, UINT, LPARAM, LPARAM);
  292. typedef ACMDRIVERPROC FAR *LPACMDRIVERPROC;
  293. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  294. //
  295. // acmDriverRemove()
  296. //
  297. //
  298. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  299. MMRESULT ACMAPI acmDriverRemove
  300. (
  301. HACMDRIVERID hadid,
  302. DWORD fdwRemove
  303. );
  304. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  305. //
  306. // acmDriverOpen()
  307. //
  308. //
  309. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  310. MMRESULT ACMAPI acmDriverOpen
  311. (
  312. LPHACMDRIVER phad,
  313. HACMDRIVERID hadid,
  314. DWORD fdwOpen
  315. );
  316. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  317. //
  318. // acmDriverClose()
  319. //
  320. //
  321. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  322. MMRESULT ACMAPI acmDriverClose
  323. (
  324. HACMDRIVER had,
  325. DWORD fdwClose
  326. );
  327. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  328. //
  329. // acmDriverMessage()
  330. //
  331. //
  332. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  333. LRESULT ACMAPI acmDriverMessage
  334. (
  335. HACMDRIVER had,
  336. UINT uMsg,
  337. LPARAM lParam1,
  338. LPARAM lParam2
  339. );
  340. //
  341. //
  342. //
  343. //
  344. #define ACMDM_USER (DRV_USER + 0x0000)
  345. #define ACMDM_RESERVED_LOW (DRV_USER + 0x2000)
  346. #define ACMDM_RESERVED_HIGH (DRV_USER + 0x2FFF)
  347. #define ACMDM_BASE ACMDM_RESERVED_LOW
  348. #define ACMDM_DRIVER_ABOUT (ACMDM_BASE + 11)
  349. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  350. //
  351. // acmDriverPriority
  352. //
  353. //
  354. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  355. MMRESULT ACMAPI acmDriverPriority
  356. (
  357. HACMDRIVERID hadid,
  358. DWORD dwPriority,
  359. DWORD fdwPriority
  360. );
  361. #define ACM_DRIVERPRIORITYF_ENABLE 0x00000001L
  362. #define ACM_DRIVERPRIORITYF_DISABLE 0x00000002L
  363. #define ACM_DRIVERPRIORITYF_ABLEMASK 0x00000003L
  364. #define ACM_DRIVERPRIORITYF_BEGIN 0x00010000L
  365. #define ACM_DRIVERPRIORITYF_END 0x00020000L
  366. #define ACM_DRIVERPRIORITYF_DEFERMASK 0x00030000L
  367. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  368. //
  369. // acmDriverDetails()
  370. //
  371. //
  372. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  373. //
  374. // ACMDRIVERDETAILS
  375. //
  376. // the ACMDRIVERDETAILS structure is used to get various capabilities from
  377. // an ACM driver (codec, converter, filter).
  378. //
  379. #define ACMDRIVERDETAILS_SHORTNAME_CHARS 32
  380. #define ACMDRIVERDETAILS_LONGNAME_CHARS 128
  381. #define ACMDRIVERDETAILS_COPYRIGHT_CHARS 80
  382. #define ACMDRIVERDETAILS_LICENSING_CHARS 128
  383. #define ACMDRIVERDETAILS_FEATURES_CHARS 512
  384. #ifdef _WIN32
  385. typedef struct tACMDRIVERDETAILSA
  386. {
  387. DWORD cbStruct; // number of valid bytes in structure
  388. FOURCC fccType; // compressor type 'audc'
  389. FOURCC fccComp; // sub-type (not used; reserved)
  390. WORD wMid; // manufacturer id
  391. WORD wPid; // product id
  392. DWORD vdwACM; // version of the ACM *compiled* for
  393. DWORD vdwDriver; // version of the driver
  394. DWORD fdwSupport; // misc. support flags
  395. DWORD cFormatTags; // total unique format tags supported
  396. DWORD cFilterTags; // total unique filter tags supported
  397. HICON hicon; // handle to custom icon
  398. char szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
  399. char szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
  400. char szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
  401. char szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
  402. char szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
  403. } ACMDRIVERDETAILSA, *PACMDRIVERDETAILSA, FAR *LPACMDRIVERDETAILSA;
  404. typedef struct tACMDRIVERDETAILSW
  405. {
  406. DWORD cbStruct; // number of valid bytes in structure
  407. FOURCC fccType; // compressor type 'audc'
  408. FOURCC fccComp; // sub-type (not used; reserved)
  409. WORD wMid; // manufacturer id
  410. WORD wPid; // product id
  411. DWORD vdwACM; // version of the ACM *compiled* for
  412. DWORD vdwDriver; // version of the driver
  413. DWORD fdwSupport; // misc. support flags
  414. DWORD cFormatTags; // total unique format tags supported
  415. DWORD cFilterTags; // total unique filter tags supported
  416. HICON hicon; // handle to custom icon
  417. WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
  418. WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
  419. WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
  420. WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
  421. WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
  422. } ACMDRIVERDETAILSW, *PACMDRIVERDETAILSW, FAR *LPACMDRIVERDETAILSW;
  423. #ifdef _UNICODE
  424. #define ACMDRIVERDETAILS ACMDRIVERDETAILSW
  425. #define PACMDRIVERDETAILS PACMDRIVERDETAILSW
  426. #define LPACMDRIVERDETAILS LPACMDRIVERDETAILSW
  427. #else
  428. #define ACMDRIVERDETAILS ACMDRIVERDETAILSA
  429. #define PACMDRIVERDETAILS PACMDRIVERDETAILSA
  430. #define LPACMDRIVERDETAILS LPACMDRIVERDETAILSA
  431. #endif
  432. #else
  433. typedef struct tACMDRIVERDETAILS
  434. {
  435. DWORD cbStruct; // number of valid bytes in structure
  436. FOURCC fccType; // compressor type 'audc'
  437. FOURCC fccComp; // sub-type (not used; reserved)
  438. WORD wMid; // manufacturer id
  439. WORD wPid; // product id
  440. DWORD vdwACM; // version of the ACM *compiled* for
  441. DWORD vdwDriver; // version of the driver
  442. DWORD fdwSupport; // misc. support flags
  443. DWORD cFormatTags; // total unique format tags supported
  444. DWORD cFilterTags; // total unique filter tags supported
  445. HICON hicon; // handle to custom icon
  446. char szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
  447. char szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
  448. char szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
  449. char szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
  450. char szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
  451. } ACMDRIVERDETAILS, *PACMDRIVERDETAILS, FAR *LPACMDRIVERDETAILS;
  452. #endif
  453. //
  454. // ACMDRIVERDETAILS.fccType
  455. //
  456. // ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC: the FOURCC used in the fccType
  457. // field of the ACMDRIVERDETAILS structure to specify that this is an ACM
  458. // codec designed for audio.
  459. //
  460. //
  461. // ACMDRIVERDETAILS.fccComp
  462. //
  463. // ACMDRIVERDETAILS_FCCCOMP_UNDEFINED: the FOURCC used in the fccComp
  464. // field of the ACMDRIVERDETAILS structure. this is currently an unused
  465. // field.
  466. //
  467. #define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC mmioFOURCC('a', 'u', 'd', 'c')
  468. #define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED mmioFOURCC('\0', '\0', '\0', '\0')
  469. //
  470. // the following flags are used to specify the type of conversion(s) that
  471. // the converter/codec/filter supports. these are placed in the fdwSupport
  472. // field of the ACMDRIVERDETAILS structure. note that a converter can
  473. // support one or more of these flags in any combination.
  474. //
  475. // ACMDRIVERDETAILS_SUPPORTF_CODEC: this flag is set if the driver supports
  476. // conversions from one format tag to another format tag. for example, if a
  477. // converter compresses WAVE_FORMAT_PCM to WAVE_FORMAT_ADPCM, then this bit
  478. // should be set.
  479. //
  480. // ACMDRIVERDETAILS_SUPPORTF_CONVERTER: this flags is set if the driver
  481. // supports conversions on the same format tag. as an example, the PCM
  482. // converter that is built into the ACM sets this bit (and only this bit)
  483. // because it converts only PCM formats (bits, sample rate).
  484. //
  485. // ACMDRIVERDETAILS_SUPPORTF_FILTER: this flag is set if the driver supports
  486. // transformations on a single format. for example, a converter that changed
  487. // the 'volume' of PCM data would set this bit. 'echo' and 'reverb' are
  488. // also filter types.
  489. //
  490. // ACMDRIVERDETAILS_SUPPORTF_HARDWARE: this flag is set if the driver supports
  491. // hardware input and/or output through a waveform device.
  492. //
  493. // ACMDRIVERDETAILS_SUPPORTF_ASYNC: this flag is set if the driver supports
  494. // async conversions.
  495. //
  496. //
  497. // ACMDRIVERDETAILS_SUPPORTF_LOCAL: this flag is set _by the ACM_ if a
  498. // driver has been installed local to the current task. this flag is also
  499. // set in the fdwSupport argument to the enumeration callback function
  500. // for drivers.
  501. //
  502. // ACMDRIVERDETAILS_SUPPORTF_DISABLED: this flag is set _by the ACM_ if a
  503. // driver has been disabled. this flag is also passed set in the fdwSupport
  504. // argument to the enumeration callback function for drivers.
  505. //
  506. #define ACMDRIVERDETAILS_SUPPORTF_CODEC 0x00000001L
  507. #define ACMDRIVERDETAILS_SUPPORTF_CONVERTER 0x00000002L
  508. #define ACMDRIVERDETAILS_SUPPORTF_FILTER 0x00000004L
  509. #define ACMDRIVERDETAILS_SUPPORTF_HARDWARE 0x00000008L
  510. #define ACMDRIVERDETAILS_SUPPORTF_ASYNC 0x00000010L
  511. #define ACMDRIVERDETAILS_SUPPORTF_LOCAL 0x40000000L
  512. #define ACMDRIVERDETAILS_SUPPORTF_DISABLED 0x80000000L
  513. #ifdef _WIN32
  514. MMRESULT ACMAPI acmDriverDetailsA
  515. (
  516. HACMDRIVERID hadid,
  517. LPACMDRIVERDETAILSA padd,
  518. DWORD fdwDetails
  519. );
  520. MMRESULT ACMAPI acmDriverDetailsW
  521. (
  522. HACMDRIVERID hadid,
  523. LPACMDRIVERDETAILSW padd,
  524. DWORD fdwDetails
  525. );
  526. #ifdef _UNICODE
  527. #define acmDriverDetails acmDriverDetailsW
  528. #else
  529. #define acmDriverDetails acmDriverDetailsA
  530. #endif
  531. #else
  532. MMRESULT ACMAPI acmDriverDetails
  533. (
  534. HACMDRIVERID hadid,
  535. LPACMDRIVERDETAILS padd,
  536. DWORD fdwDetails
  537. );
  538. #endif
  539. //--------------------------------------------------------------------------;
  540. //
  541. // ACM Format Tags
  542. //
  543. //
  544. //
  545. //
  546. //--------------------------------------------------------------------------;
  547. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  548. //
  549. // acmFormatTagDetails()
  550. //
  551. //
  552. //
  553. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  554. #define ACMFORMATTAGDETAILS_FORMATTAG_CHARS 48
  555. #ifdef _WIN32
  556. typedef struct tACMFORMATTAGDETAILSA
  557. {
  558. DWORD cbStruct;
  559. DWORD dwFormatTagIndex;
  560. DWORD dwFormatTag;
  561. DWORD cbFormatSize;
  562. DWORD fdwSupport;
  563. DWORD cStandardFormats;
  564. char szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
  565. } ACMFORMATTAGDETAILSA, *PACMFORMATTAGDETAILSA, FAR *LPACMFORMATTAGDETAILSA;
  566. typedef struct tACMFORMATTAGDETAILSW
  567. {
  568. DWORD cbStruct;
  569. DWORD dwFormatTagIndex;
  570. DWORD dwFormatTag;
  571. DWORD cbFormatSize;
  572. DWORD fdwSupport;
  573. DWORD cStandardFormats;
  574. WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
  575. } ACMFORMATTAGDETAILSW, *PACMFORMATTAGDETAILSW, FAR *LPACMFORMATTAGDETAILSW;
  576. #ifdef _UNICODE
  577. #define ACMFORMATTAGDETAILS ACMFORMATTAGDETAILSW
  578. #define PACMFORMATTAGDETAILS PACMFORMATTAGDETAILSW
  579. #define LPACMFORMATTAGDETAILS LPACMFORMATTAGDETAILSW
  580. #else
  581. #define ACMFORMATTAGDETAILS ACMFORMATTAGDETAILSA
  582. #define PACMFORMATTAGDETAILS PACMFORMATTAGDETAILSA
  583. #define LPACMFORMATTAGDETAILS LPACMFORMATTAGDETAILSA
  584. #endif
  585. #else
  586. typedef struct tACMFORMATTAGDETAILS
  587. {
  588. DWORD cbStruct;
  589. DWORD dwFormatTagIndex;
  590. DWORD dwFormatTag;
  591. DWORD cbFormatSize;
  592. DWORD fdwSupport;
  593. DWORD cStandardFormats;
  594. char szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
  595. } ACMFORMATTAGDETAILS, *PACMFORMATTAGDETAILS, FAR *LPACMFORMATTAGDETAILS;
  596. #endif
  597. #ifdef _WIN32
  598. MMRESULT ACMAPI acmFormatTagDetailsA
  599. (
  600. HACMDRIVER had,
  601. LPACMFORMATTAGDETAILSA paftd,
  602. DWORD fdwDetails
  603. );
  604. MMRESULT ACMAPI acmFormatTagDetailsW
  605. (
  606. HACMDRIVER had,
  607. LPACMFORMATTAGDETAILSW paftd,
  608. DWORD fdwDetails
  609. );
  610. #ifdef _UNICODE
  611. #define acmFormatTagDetails acmFormatTagDetailsW
  612. #else
  613. #define acmFormatTagDetails acmFormatTagDetailsA
  614. #endif
  615. #else
  616. MMRESULT ACMAPI acmFormatTagDetails
  617. (
  618. HACMDRIVER had,
  619. LPACMFORMATTAGDETAILS paftd,
  620. DWORD fdwDetails
  621. );
  622. #endif
  623. #define ACM_FORMATTAGDETAILSF_INDEX 0x00000000L
  624. #define ACM_FORMATTAGDETAILSF_FORMATTAG 0x00000001L
  625. #define ACM_FORMATTAGDETAILSF_LARGESTSIZE 0x00000002L
  626. #define ACM_FORMATTAGDETAILSF_QUERYMASK 0x0000000FL
  627. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  628. //
  629. // acmFormatTagEnum()
  630. //
  631. //
  632. //
  633. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  634. #ifdef _WIN32
  635. typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA)
  636. (
  637. HACMDRIVERID hadid,
  638. LPACMFORMATTAGDETAILSA paftd,
  639. DWORD dwInstance,
  640. DWORD fdwSupport
  641. );
  642. MMRESULT ACMAPI acmFormatTagEnumA
  643. (
  644. HACMDRIVER had,
  645. LPACMFORMATTAGDETAILSA paftd,
  646. ACMFORMATTAGENUMCBA fnCallback,
  647. DWORD dwInstance,
  648. DWORD fdwEnum
  649. );
  650. typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW)
  651. (
  652. HACMDRIVERID hadid,
  653. LPACMFORMATTAGDETAILSW paftd,
  654. DWORD dwInstance,
  655. DWORD fdwSupport
  656. );
  657. MMRESULT ACMAPI acmFormatTagEnumW
  658. (
  659. HACMDRIVER had,
  660. LPACMFORMATTAGDETAILSW paftd,
  661. ACMFORMATTAGENUMCBW fnCallback,
  662. DWORD dwInstance,
  663. DWORD fdwEnum
  664. );
  665. #ifdef _UNICODE
  666. #define ACMFORMATTAGENUMCB ACMFORMATTAGENUMCBW
  667. #define acmFormatTagEnum acmFormatTagEnumW
  668. #else
  669. #define ACMFORMATTAGENUMCB ACMFORMATTAGENUMCBA
  670. #define acmFormatTagEnum acmFormatTagEnumA
  671. #endif
  672. #else
  673. typedef BOOL (CALLBACK *ACMFORMATTAGENUMCB)
  674. (
  675. HACMDRIVERID hadid,
  676. LPACMFORMATTAGDETAILS paftd,
  677. DWORD dwInstance,
  678. DWORD fdwSupport
  679. );
  680. MMRESULT ACMAPI acmFormatTagEnum
  681. (
  682. HACMDRIVER had,
  683. LPACMFORMATTAGDETAILS paftd,
  684. ACMFORMATTAGENUMCB fnCallback,
  685. DWORD dwInstance,
  686. DWORD fdwEnum
  687. );
  688. #endif
  689. //--------------------------------------------------------------------------;
  690. //
  691. // ACM Formats
  692. //
  693. //
  694. //
  695. //
  696. //--------------------------------------------------------------------------;
  697. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  698. //
  699. // acmFormatDetails()
  700. //
  701. //
  702. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  703. #define ACMFORMATDETAILS_FORMAT_CHARS 128
  704. #ifdef _WIN32
  705. typedef struct tACMFORMATDETAILSA
  706. {
  707. DWORD cbStruct;
  708. DWORD dwFormatIndex;
  709. DWORD dwFormatTag;
  710. DWORD fdwSupport;
  711. LPWAVEFORMATEX pwfx;
  712. DWORD cbwfx;
  713. char szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
  714. } ACMFORMATDETAILSA, *PACMFORMATDETAILSA, FAR *LPACMFORMATDETAILSA;
  715. typedef struct tACMFORMATDETAILSW
  716. {
  717. DWORD cbStruct;
  718. DWORD dwFormatIndex;
  719. DWORD dwFormatTag;
  720. DWORD fdwSupport;
  721. LPWAVEFORMATEX pwfx;
  722. DWORD cbwfx;
  723. WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
  724. } ACMFORMATDETAILSW, *PACMFORMATDETAILSW, FAR *LPACMFORMATDETAILSW;
  725. #ifdef _UNICODE
  726. #define ACMFORMATDETAILS ACMFORMATDETAILSW
  727. #define PACMFORMATDETAILS PACMFORMATDETAILSW
  728. #define LPACMFORMATDETAILS LPACMFORMATDETAILSW
  729. #else
  730. #define ACMFORMATDETAILS ACMFORMATDETAILSA
  731. #define PACMFORMATDETAILS PACMFORMATDETAILSA
  732. #define LPACMFORMATDETAILS LPACMFORMATDETAILSA
  733. #endif
  734. #else
  735. typedef struct tACMFORMATDETAILS
  736. {
  737. DWORD cbStruct;
  738. DWORD dwFormatIndex;
  739. DWORD dwFormatTag;
  740. DWORD fdwSupport;
  741. LPWAVEFORMATEX pwfx;
  742. DWORD cbwfx;
  743. char szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
  744. } ACMFORMATDETAILS, *PACMFORMATDETAILS, FAR *LPACMFORMATDETAILS;
  745. #endif
  746. #ifdef _WIN32
  747. MMRESULT ACMAPI acmFormatDetailsA
  748. (
  749. HACMDRIVER had,
  750. LPACMFORMATDETAILSA pafd,
  751. DWORD fdwDetails
  752. );
  753. MMRESULT ACMAPI acmFormatDetailsW
  754. (
  755. HACMDRIVER had,
  756. LPACMFORMATDETAILSW pafd,
  757. DWORD fdwDetails
  758. );
  759. #ifdef _UNICODE
  760. #define acmFormatDetails acmFormatDetailsW
  761. #else
  762. #define acmFormatDetails acmFormatDetailsA
  763. #endif
  764. #else
  765. MMRESULT ACMAPI acmFormatDetails
  766. (
  767. HACMDRIVER had,
  768. LPACMFORMATDETAILS pafd,
  769. DWORD fdwDetails
  770. );
  771. #endif
  772. #define ACM_FORMATDETAILSF_INDEX 0x00000000L
  773. #define ACM_FORMATDETAILSF_FORMAT 0x00000001L
  774. #define ACM_FORMATDETAILSF_QUERYMASK 0x0000000FL
  775. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  776. //
  777. // acmFormatEnum()
  778. //
  779. //
  780. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  781. #ifdef _WIN32
  782. typedef BOOL (CALLBACK *ACMFORMATENUMCBA)
  783. (
  784. HACMDRIVERID hadid,
  785. LPACMFORMATDETAILSA pafd,
  786. DWORD dwInstance,
  787. DWORD fdwSupport
  788. );
  789. MMRESULT ACMAPI acmFormatEnumA
  790. (
  791. HACMDRIVER had,
  792. LPACMFORMATDETAILSA pafd,
  793. ACMFORMATENUMCBA fnCallback,
  794. DWORD dwInstance,
  795. DWORD fdwEnum
  796. );
  797. typedef BOOL (CALLBACK *ACMFORMATENUMCBW)
  798. (
  799. HACMDRIVERID hadid,
  800. LPACMFORMATDETAILSW pafd,
  801. DWORD dwInstance,
  802. DWORD fdwSupport
  803. );
  804. MMRESULT ACMAPI acmFormatEnumW
  805. (
  806. HACMDRIVER had,
  807. LPACMFORMATDETAILSW pafd,
  808. ACMFORMATENUMCBW fnCallback,
  809. DWORD dwInstance,
  810. DWORD fdwEnum
  811. );
  812. #ifdef _UNICODE
  813. #define ACMFORMATENUMCB ACMFORMATENUMCBW
  814. #define acmFormatEnum acmFormatEnumW
  815. #else
  816. #define ACMFORMATENUMCB ACMFORMATENUMCBA
  817. #define acmFormatEnum acmFormatEnumA
  818. #endif
  819. #else
  820. typedef BOOL (CALLBACK *ACMFORMATENUMCB)
  821. (
  822. HACMDRIVERID hadid,
  823. LPACMFORMATDETAILS pafd,
  824. DWORD dwInstance,
  825. DWORD fdwSupport
  826. );
  827. MMRESULT ACMAPI acmFormatEnum
  828. (
  829. HACMDRIVER had,
  830. LPACMFORMATDETAILS pafd,
  831. ACMFORMATENUMCB fnCallback,
  832. DWORD dwInstance,
  833. DWORD fdwEnum
  834. );
  835. #endif
  836. #define ACM_FORMATENUMF_WFORMATTAG 0x00010000L
  837. #define ACM_FORMATENUMF_NCHANNELS 0x00020000L
  838. #define ACM_FORMATENUMF_NSAMPLESPERSEC 0x00040000L
  839. #define ACM_FORMATENUMF_WBITSPERSAMPLE 0x00080000L
  840. #define ACM_FORMATENUMF_CONVERT 0x00100000L
  841. #define ACM_FORMATENUMF_SUGGEST 0x00200000L
  842. #define ACM_FORMATENUMF_HARDWARE 0x00400000L
  843. #define ACM_FORMATENUMF_INPUT 0x00800000L
  844. #define ACM_FORMATENUMF_OUTPUT 0x01000000L
  845. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  846. //
  847. // acmFormatSuggest()
  848. //
  849. //
  850. //
  851. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  852. MMRESULT ACMAPI acmFormatSuggest
  853. (
  854. HACMDRIVER had,
  855. LPWAVEFORMATEX pwfxSrc,
  856. LPWAVEFORMATEX pwfxDst,
  857. DWORD cbwfxDst,
  858. DWORD fdwSuggest
  859. );
  860. #define ACM_FORMATSUGGESTF_WFORMATTAG 0x00010000L
  861. #define ACM_FORMATSUGGESTF_NCHANNELS 0x00020000L
  862. #define ACM_FORMATSUGGESTF_NSAMPLESPERSEC 0x00040000L
  863. #define ACM_FORMATSUGGESTF_WBITSPERSAMPLE 0x00080000L
  864. #define ACM_FORMATSUGGESTF_TYPEMASK 0x00FF0000L
  865. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  866. //
  867. // acmFormatChoose()
  868. //
  869. //
  870. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  871. #ifdef _WIN32
  872. #define ACMHELPMSGSTRINGA "acmchoose_help"
  873. #define ACMHELPMSGSTRINGW L"acmchoose_help"
  874. #ifdef _UNICODE
  875. #define ACMHELPMSGSTRING ACMHELPMSGSTRINGW
  876. #else
  877. #define ACMHELPMSGSTRING ACMHELPMSGSTRINGA
  878. #endif
  879. #else
  880. #define ACMHELPMSGSTRING "acmchoose_help"
  881. #endif
  882. //
  883. // MM_ACM_FORMATCHOOSE is sent to hook callbacks by the Format Chooser
  884. // Dialog...
  885. //
  886. #define MM_ACM_FORMATCHOOSE (0x8000)
  887. #define FORMATCHOOSE_MESSAGE 0
  888. #define FORMATCHOOSE_FORMATTAG_VERIFY (FORMATCHOOSE_MESSAGE+0)
  889. #define FORMATCHOOSE_FORMAT_VERIFY (FORMATCHOOSE_MESSAGE+1)
  890. #define FORMATCHOOSE_CUSTOM_VERIFY (FORMATCHOOSE_MESSAGE+2)
  891. #ifdef _WIN32
  892. typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCA)
  893. (
  894. HWND hwnd,
  895. UINT uMsg,
  896. WPARAM wParam,
  897. LPARAM lParam
  898. );
  899. typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCW)
  900. (
  901. HWND hwnd,
  902. UINT uMsg,
  903. WPARAM wParam,
  904. LPARAM lParam
  905. );
  906. #ifdef _UNICODE
  907. #define ACMFORMATCHOOSEHOOKPROC ACMFORMATCHOOSEHOOKPROCW
  908. #else
  909. #define ACMFORMATCHOOSEHOOKPROC ACMFORMATCHOOSEHOOKPROCA
  910. #endif
  911. #else
  912. typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROC)
  913. (
  914. HWND hwnd,
  915. UINT uMsg,
  916. WPARAM wParam,
  917. LPARAM lParam
  918. );
  919. #endif
  920. //
  921. //
  922. //
  923. //
  924. #ifdef _WIN32
  925. typedef struct tACMFORMATCHOOSEA
  926. {
  927. DWORD cbStruct; // sizeof(ACMFORMATCHOOSE)
  928. DWORD fdwStyle; // chooser style flags
  929. HWND hwndOwner; // caller's window handle
  930. LPWAVEFORMATEX pwfx; // ptr to wfx buf to receive choice
  931. DWORD cbwfx; // size of mem buf for pwfx
  932. LPCSTR pszTitle; // dialog box title bar
  933. char szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
  934. char szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
  935. LPSTR pszName; // custom name selection
  936. DWORD cchName; // size in chars of mem buf for pszName
  937. DWORD fdwEnum; // format enumeration restrictions
  938. LPWAVEFORMATEX pwfxEnum; // format describing restrictions
  939. //
  940. // the following members are used for custom templates only--which
  941. // are enabled by specifying ACMFORMATCHOOSE_STYLEF_ENABLEHOOK in the
  942. // fdwStyle member.
  943. //
  944. // these members are IGNORED if ACMFORMATCHOOSE_STYLEF_ENABLEHOOK is
  945. // not specified.
  946. //
  947. HINSTANCE hInstance; // .EXE containing cust. dlg. template
  948. LPCSTR pszTemplateName; // custom template name
  949. LPARAM lCustData; // data passed to hook fn.
  950. ACMFORMATCHOOSEHOOKPROCA pfnHook; // ptr to hook function
  951. } ACMFORMATCHOOSEA, *PACMFORMATCHOOSEA, FAR *LPACMFORMATCHOOSEA;
  952. typedef struct tACMFORMATCHOOSEW
  953. {
  954. DWORD cbStruct; // sizeof(ACMFORMATCHOOSE)
  955. DWORD fdwStyle; // chooser style flags
  956. HWND hwndOwner; // caller's window handle
  957. LPWAVEFORMATEX pwfx; // ptr to wfx buf to receive choice
  958. DWORD cbwfx; // size of mem buf for pwfx
  959. LPCWSTR pszTitle; // dialog box title bar
  960. WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
  961. WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
  962. LPWSTR pszName; // custom name selection
  963. DWORD cchName; // size in chars of mem buf for pszName
  964. DWORD fdwEnum; // format enumeration restrictions
  965. LPWAVEFORMATEX pwfxEnum; // format describing restrictions
  966. //
  967. // the following members are used for custom templates only--which
  968. // are enabled by specifying ACMFORMATCHOOSE_STYLEF_ENABLEHOOK in the
  969. // fdwStyle member.
  970. //
  971. // these members are IGNORED if ACMFORMATCHOOSE_STYLEF_ENABLEHOOK is
  972. // not specified.
  973. //
  974. HINSTANCE hInstance; // .EXE containing cust. dlg. template
  975. LPCWSTR pszTemplateName; // custom template name
  976. LPARAM lCustData; // data passed to hook fn.
  977. ACMFORMATCHOOSEHOOKPROCW pfnHook; // ptr to hook function
  978. } ACMFORMATCHOOSEW, *PACMFORMATCHOOSEW, FAR *LPACMFORMATCHOOSEW;
  979. #ifdef _UNICODE
  980. #define ACMFORMATCHOOSE ACMFORMATCHOOSEW
  981. #define PACMFORMATCHOOSE PACMFORMATCHOOSEW
  982. #define LPACMFORMATCHOOSE LPACMFORMATCHOOSEW
  983. #else
  984. #define ACMFORMATCHOOSE ACMFORMATCHOOSEA
  985. #define PACMFORMATCHOOSE PACMFORMATCHOOSEA
  986. #define LPACMFORMATCHOOSE LPACMFORMATCHOOSEA
  987. #endif
  988. #else
  989. typedef struct tACMFORMATCHOOSE
  990. {
  991. DWORD cbStruct; // sizeof(ACMFORMATCHOOSE)
  992. DWORD fdwStyle; // chooser style flags
  993. HWND hwndOwner; // caller's window handle
  994. LPWAVEFORMATEX pwfx; // ptr to wfx buf to receive choice
  995. DWORD cbwfx; // size of mem buf for pwfx
  996. LPCSTR pszTitle; // dialog box title bar
  997. char szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
  998. char szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
  999. LPSTR pszName; // custom name selection
  1000. DWORD cchName; // size in chars of mem buf for pszName
  1001. DWORD fdwEnum; // format enumeration restrictions
  1002. LPWAVEFORMATEX pwfxEnum; // format describing restrictions
  1003. //
  1004. // the following members are used for custom templates only--which
  1005. // are enabled by specifying ACMFORMATCHOOSE_STYLEF_ENABLEHOOK in the
  1006. // fdwStyle member.
  1007. //
  1008. // these members are IGNORED if ACMFORMATCHOOSE_STYLEF_ENABLEHOOK is
  1009. // not specified.
  1010. //
  1011. HINSTANCE hInstance; // .EXE containing cust. dlg. template
  1012. LPCSTR pszTemplateName; // custom template name
  1013. LPARAM lCustData; // data passed to hook fn.
  1014. ACMFORMATCHOOSEHOOKPROC pfnHook; // ptr to hook function
  1015. } ACMFORMATCHOOSE, *PACMFORMATCHOOSE, FAR *LPACMFORMATCHOOSE;
  1016. #endif
  1017. //
  1018. // ACMFORMATCHOOSE.fdwStyle
  1019. //
  1020. //
  1021. //
  1022. #define ACMFORMATCHOOSE_STYLEF_SHOWHELP 0x00000004L
  1023. #define ACMFORMATCHOOSE_STYLEF_ENABLEHOOK 0x00000008L
  1024. #define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE 0x00000010L
  1025. #define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
  1026. #define ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT 0x00000040L
  1027. #ifdef _WIN32
  1028. MMRESULT ACMAPI acmFormatChooseA
  1029. (
  1030. LPACMFORMATCHOOSEA pafmtc
  1031. );
  1032. MMRESULT ACMAPI acmFormatChooseW
  1033. (
  1034. LPACMFORMATCHOOSEW pafmtc
  1035. );
  1036. #ifdef _UNICODE
  1037. #define acmFormatChoose acmFormatChooseW
  1038. #else
  1039. #define acmFormatChoose acmFormatChooseA
  1040. #endif
  1041. #else
  1042. MMRESULT ACMAPI acmFormatChoose
  1043. (
  1044. LPACMFORMATCHOOSE pafmtc
  1045. );
  1046. #endif
  1047. //--------------------------------------------------------------------------;
  1048. //
  1049. // ACM Filter Tags
  1050. //
  1051. //
  1052. //
  1053. //
  1054. //--------------------------------------------------------------------------;
  1055. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1056. //
  1057. // acmFilterTagDetails()
  1058. //
  1059. //
  1060. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1061. #define ACMFILTERTAGDETAILS_FILTERTAG_CHARS 48
  1062. #ifdef _WIN32
  1063. typedef struct tACMFILTERTAGDETAILSA
  1064. {
  1065. DWORD cbStruct;
  1066. DWORD dwFilterTagIndex;
  1067. DWORD dwFilterTag;
  1068. DWORD cbFilterSize;
  1069. DWORD fdwSupport;
  1070. DWORD cStandardFilters;
  1071. char szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
  1072. } ACMFILTERTAGDETAILSA, *PACMFILTERTAGDETAILSA, FAR *LPACMFILTERTAGDETAILSA;
  1073. typedef struct tACMFILTERTAGDETAILSW
  1074. {
  1075. DWORD cbStruct;
  1076. DWORD dwFilterTagIndex;
  1077. DWORD dwFilterTag;
  1078. DWORD cbFilterSize;
  1079. DWORD fdwSupport;
  1080. DWORD cStandardFilters;
  1081. WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
  1082. } ACMFILTERTAGDETAILSW, *PACMFILTERTAGDETAILSW, FAR *LPACMFILTERTAGDETAILSW;
  1083. #ifdef _UNICODE
  1084. #define ACMFILTERTAGDETAILS ACMFILTERTAGDETAILSW
  1085. #define PACMFILTERTAGDETAILS PACMFILTERTAGDETAILSW
  1086. #define LPACMFILTERTAGDETAILS LPACMFILTERTAGDETAILSW
  1087. #else
  1088. #define ACMFILTERTAGDETAILS ACMFILTERTAGDETAILSA
  1089. #define PACMFILTERTAGDETAILS PACMFILTERTAGDETAILSA
  1090. #define LPACMFILTERTAGDETAILS LPACMFILTERTAGDETAILSA
  1091. #endif
  1092. #else
  1093. typedef struct tACMFILTERTAGDETAILS
  1094. {
  1095. DWORD cbStruct;
  1096. DWORD dwFilterTagIndex;
  1097. DWORD dwFilterTag;
  1098. DWORD cbFilterSize;
  1099. DWORD fdwSupport;
  1100. DWORD cStandardFilters;
  1101. char szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
  1102. } ACMFILTERTAGDETAILS, *PACMFILTERTAGDETAILS, FAR *LPACMFILTERTAGDETAILS;
  1103. #endif
  1104. #ifdef _WIN32
  1105. MMRESULT ACMAPI acmFilterTagDetailsA
  1106. (
  1107. HACMDRIVER had,
  1108. LPACMFILTERTAGDETAILSA paftd,
  1109. DWORD fdwDetails
  1110. );
  1111. MMRESULT ACMAPI acmFilterTagDetailsW
  1112. (
  1113. HACMDRIVER had,
  1114. LPACMFILTERTAGDETAILSW paftd,
  1115. DWORD fdwDetails
  1116. );
  1117. #ifdef _UNICODE
  1118. #define acmFilterTagDetails acmFilterTagDetailsW
  1119. #else
  1120. #define acmFilterTagDetails acmFilterTagDetailsA
  1121. #endif
  1122. #else
  1123. MMRESULT ACMAPI acmFilterTagDetails
  1124. (
  1125. HACMDRIVER had,
  1126. LPACMFILTERTAGDETAILS paftd,
  1127. DWORD fdwDetails
  1128. );
  1129. #endif
  1130. #define ACM_FILTERTAGDETAILSF_INDEX 0x00000000L
  1131. #define ACM_FILTERTAGDETAILSF_FILTERTAG 0x00000001L
  1132. #define ACM_FILTERTAGDETAILSF_LARGESTSIZE 0x00000002L
  1133. #define ACM_FILTERTAGDETAILSF_QUERYMASK 0x0000000FL
  1134. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1135. //
  1136. // acmFilterTagEnum()
  1137. //
  1138. //
  1139. //
  1140. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1141. #ifdef _WIN32
  1142. typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBA)
  1143. (
  1144. HACMDRIVERID hadid,
  1145. LPACMFILTERTAGDETAILSA paftd,
  1146. DWORD dwInstance,
  1147. DWORD fdwSupport
  1148. );
  1149. MMRESULT ACMAPI acmFilterTagEnumA
  1150. (
  1151. HACMDRIVER had,
  1152. LPACMFILTERTAGDETAILSA paftd,
  1153. ACMFILTERTAGENUMCBA fnCallback,
  1154. DWORD dwInstance,
  1155. DWORD fdwEnum
  1156. );
  1157. typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBW)
  1158. (
  1159. HACMDRIVERID hadid,
  1160. LPACMFILTERTAGDETAILSW paftd,
  1161. DWORD dwInstance,
  1162. DWORD fdwSupport
  1163. );
  1164. MMRESULT ACMAPI acmFilterTagEnumW
  1165. (
  1166. HACMDRIVER had,
  1167. LPACMFILTERTAGDETAILSW paftd,
  1168. ACMFILTERTAGENUMCBW fnCallback,
  1169. DWORD dwInstance,
  1170. DWORD fdwEnum
  1171. );
  1172. #ifdef _UNICODE
  1173. #define ACMFILTERTAGENUMCB ACMFILTERTAGENUMCBW
  1174. #define acmFilterTagEnum acmFilterTagEnumW
  1175. #else
  1176. #define ACMFILTERTAGENUMCB ACMFILTERTAGENUMCBA
  1177. #define acmFilterTagEnum acmFilterTagEnumA
  1178. #endif
  1179. #else
  1180. typedef BOOL (CALLBACK *ACMFILTERTAGENUMCB)
  1181. (
  1182. HACMDRIVERID hadid,
  1183. LPACMFILTERTAGDETAILS paftd,
  1184. DWORD dwInstance,
  1185. DWORD fdwSupport
  1186. );
  1187. MMRESULT ACMAPI acmFilterTagEnum
  1188. (
  1189. HACMDRIVER had,
  1190. LPACMFILTERTAGDETAILS paftd,
  1191. ACMFILTERTAGENUMCB fnCallback,
  1192. DWORD dwInstance,
  1193. DWORD fdwEnum
  1194. );
  1195. #endif
  1196. //--------------------------------------------------------------------------;
  1197. //
  1198. // ACM Filters
  1199. //
  1200. //
  1201. //
  1202. //
  1203. //--------------------------------------------------------------------------;
  1204. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1205. //
  1206. // acmFilterDetails()
  1207. //
  1208. //
  1209. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1210. #define ACMFILTERDETAILS_FILTER_CHARS 128
  1211. #ifdef _WIN32
  1212. typedef struct tACMFILTERDETAILSA
  1213. {
  1214. DWORD cbStruct;
  1215. DWORD dwFilterIndex;
  1216. DWORD dwFilterTag;
  1217. DWORD fdwSupport;
  1218. LPWAVEFILTER pwfltr;
  1219. DWORD cbwfltr;
  1220. char szFilter[ACMFILTERDETAILS_FILTER_CHARS];
  1221. } ACMFILTERDETAILSA, *PACMFILTERDETAILSA, FAR *LPACMFILTERDETAILSA;
  1222. typedef struct tACMFILTERDETAILSW
  1223. {
  1224. DWORD cbStruct;
  1225. DWORD dwFilterIndex;
  1226. DWORD dwFilterTag;
  1227. DWORD fdwSupport;
  1228. LPWAVEFILTER pwfltr;
  1229. DWORD cbwfltr;
  1230. WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
  1231. } ACMFILTERDETAILSW, *PACMFILTERDETAILSW, FAR *LPACMFILTERDETAILSW;
  1232. #ifdef _UNICODE
  1233. #define ACMFILTERDETAILS ACMFILTERDETAILSW
  1234. #define PACMFILTERDETAILS PACMFILTERDETAILSW
  1235. #define LPACMFILTERDETAILS LPACMFILTERDETAILSW
  1236. #else
  1237. #define ACMFILTERDETAILS ACMFILTERDETAILSA
  1238. #define PACMFILTERDETAILS PACMFILTERDETAILSA
  1239. #define LPACMFILTERDETAILS LPACMFILTERDETAILSA
  1240. #endif
  1241. #else
  1242. typedef struct tACMFILTERDETAILS
  1243. {
  1244. DWORD cbStruct;
  1245. DWORD dwFilterIndex;
  1246. DWORD dwFilterTag;
  1247. DWORD fdwSupport;
  1248. LPWAVEFILTER pwfltr;
  1249. DWORD cbwfltr;
  1250. char szFilter[ACMFILTERDETAILS_FILTER_CHARS];
  1251. } ACMFILTERDETAILS, *PACMFILTERDETAILS, FAR *LPACMFILTERDETAILS;
  1252. #endif
  1253. #ifdef _WIN32
  1254. MMRESULT ACMAPI acmFilterDetailsA
  1255. (
  1256. HACMDRIVER had,
  1257. LPACMFILTERDETAILSA pafd,
  1258. DWORD fdwDetails
  1259. );
  1260. MMRESULT ACMAPI acmFilterDetailsW
  1261. (
  1262. HACMDRIVER had,
  1263. LPACMFILTERDETAILSW pafd,
  1264. DWORD fdwDetails
  1265. );
  1266. #ifdef _UNICODE
  1267. #define acmFilterDetails acmFilterDetailsW
  1268. #else
  1269. #define acmFilterDetails acmFilterDetailsA
  1270. #endif
  1271. #else
  1272. MMRESULT ACMAPI acmFilterDetails
  1273. (
  1274. HACMDRIVER had,
  1275. LPACMFILTERDETAILS pafd,
  1276. DWORD fdwDetails
  1277. );
  1278. #endif
  1279. #define ACM_FILTERDETAILSF_INDEX 0x00000000L
  1280. #define ACM_FILTERDETAILSF_FILTER 0x00000001L
  1281. #define ACM_FILTERDETAILSF_QUERYMASK 0x0000000FL
  1282. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1283. //
  1284. // acmFilterEnum()
  1285. //
  1286. //
  1287. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1288. #ifdef _WIN32
  1289. typedef BOOL (CALLBACK *ACMFILTERENUMCBA)
  1290. (
  1291. HACMDRIVERID hadid,
  1292. LPACMFILTERDETAILSA pafd,
  1293. DWORD dwInstance,
  1294. DWORD fdwSupport
  1295. );
  1296. MMRESULT ACMAPI acmFilterEnumA
  1297. (
  1298. HACMDRIVER had,
  1299. LPACMFILTERDETAILSA pafd,
  1300. ACMFILTERENUMCBA fnCallback,
  1301. DWORD dwInstance,
  1302. DWORD fdwEnum
  1303. );
  1304. typedef BOOL (CALLBACK *ACMFILTERENUMCBW)
  1305. (
  1306. HACMDRIVERID hadid,
  1307. LPACMFILTERDETAILSW pafd,
  1308. DWORD dwInstance,
  1309. DWORD fdwSupport
  1310. );
  1311. MMRESULT ACMAPI acmFilterEnumW
  1312. (
  1313. HACMDRIVER had,
  1314. LPACMFILTERDETAILSW pafd,
  1315. ACMFILTERENUMCBW fnCallback,
  1316. DWORD dwInstance,
  1317. DWORD fdwEnum
  1318. );
  1319. #ifdef _UNICODE
  1320. #define ACMFILTERENUMCB ACMFILTERENUMCBW
  1321. #define acmFilterEnum acmFilterEnumW
  1322. #else
  1323. #define ACMFILTERENUMCB ACMFILTERENUMCBA
  1324. #define acmFilterEnum acmFilterEnumA
  1325. #endif
  1326. #else
  1327. typedef BOOL (CALLBACK *ACMFILTERENUMCB)
  1328. (
  1329. HACMDRIVERID hadid,
  1330. LPACMFILTERDETAILS pafd,
  1331. DWORD dwInstance,
  1332. DWORD fdwSupport
  1333. );
  1334. MMRESULT ACMAPI acmFilterEnum
  1335. (
  1336. HACMDRIVER had,
  1337. LPACMFILTERDETAILS pafd,
  1338. ACMFILTERENUMCB fnCallback,
  1339. DWORD dwInstance,
  1340. DWORD fdwEnum
  1341. );
  1342. #endif
  1343. #define ACM_FILTERENUMF_DWFILTERTAG 0x00010000L
  1344. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1345. //
  1346. // acmFilterChoose()
  1347. //
  1348. //
  1349. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1350. //
  1351. // MM_ACM_FILTERCHOOSE is sent to hook callbacks by the Filter Chooser
  1352. // Dialog...
  1353. //
  1354. #define MM_ACM_FILTERCHOOSE (0x8000)
  1355. #define FILTERCHOOSE_MESSAGE 0
  1356. #define FILTERCHOOSE_FILTERTAG_VERIFY (FILTERCHOOSE_MESSAGE+0)
  1357. #define FILTERCHOOSE_FILTER_VERIFY (FILTERCHOOSE_MESSAGE+1)
  1358. #define FILTERCHOOSE_CUSTOM_VERIFY (FILTERCHOOSE_MESSAGE+2)
  1359. #ifdef _WIN32
  1360. typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCA)
  1361. (
  1362. HWND hwnd,
  1363. UINT uMsg,
  1364. WPARAM wParam,
  1365. LPARAM lParam
  1366. );
  1367. typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCW)
  1368. (
  1369. HWND hwnd,
  1370. UINT uMsg,
  1371. WPARAM wParam,
  1372. LPARAM lParam
  1373. );
  1374. #ifdef _UNICODE
  1375. #define ACMFILTERCHOOSEHOOKPROC ACMFILTERCHOOSEHOOKPROCW
  1376. #else
  1377. #define ACMFILTERCHOOSEHOOKPROC ACMFILTERCHOOSEHOOKPROCA
  1378. #endif
  1379. #else
  1380. typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROC)
  1381. (
  1382. HWND hwnd,
  1383. UINT uMsg,
  1384. WPARAM wParam,
  1385. LPARAM lParam
  1386. );
  1387. #endif
  1388. //
  1389. // ACMFILTERCHOOSE
  1390. //
  1391. //
  1392. #ifdef _WIN32
  1393. typedef struct tACMFILTERCHOOSEA
  1394. {
  1395. DWORD cbStruct; // sizeof(ACMFILTERCHOOSE)
  1396. DWORD fdwStyle; // chooser style flags
  1397. HWND hwndOwner; // caller's window handle
  1398. LPWAVEFILTER pwfltr; // ptr to wfltr buf to receive choice
  1399. DWORD cbwfltr; // size of mem buf for pwfltr
  1400. LPCSTR pszTitle;
  1401. char szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
  1402. char szFilter[ACMFILTERDETAILS_FILTER_CHARS];
  1403. LPSTR pszName; // custom name selection
  1404. DWORD cchName; // size in chars of mem buf for pszName
  1405. DWORD fdwEnum; // filter enumeration restrictions
  1406. LPWAVEFILTER pwfltrEnum; // filter describing restrictions
  1407. //
  1408. // the following members are used for custom templates only--which
  1409. // are enabled by specifying ACMFILTERCHOOSE_STYLEF_ENABLEHOOK in the
  1410. // fdwStyle member.
  1411. //
  1412. // these members are IGNORED if ACMFILTERCHOOSE_STYLEF_ENABLEHOOK is not
  1413. // specified.
  1414. //
  1415. HINSTANCE hInstance; // .EXE containing cust. dlg. template
  1416. LPCSTR pszTemplateName; // custom template name
  1417. LPARAM lCustData; // data passed to hook fn.
  1418. ACMFILTERCHOOSEHOOKPROCA pfnHook; // ptr to hook function
  1419. } ACMFILTERCHOOSEA, *PACMFILTERCHOOSEA, FAR *LPACMFILTERCHOOSEA;
  1420. typedef struct tACMFILTERCHOOSEW
  1421. {
  1422. DWORD cbStruct; // sizeof(ACMFILTERCHOOSE)
  1423. DWORD fdwStyle; // chooser style flags
  1424. HWND hwndOwner; // caller's window handle
  1425. LPWAVEFILTER pwfltr; // ptr to wfltr buf to receive choice
  1426. DWORD cbwfltr; // size of mem buf for pwfltr
  1427. LPCWSTR pszTitle;
  1428. WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
  1429. WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
  1430. LPWSTR pszName; // custom name selection
  1431. DWORD cchName; // size in chars of mem buf for pszName
  1432. DWORD fdwEnum; // filter enumeration restrictions
  1433. LPWAVEFILTER pwfltrEnum; // filter describing restrictions
  1434. //
  1435. // the following members are used for custom templates only--which
  1436. // are enabled by specifying ACMFILTERCHOOSE_STYLEF_ENABLEHOOK in the
  1437. // fdwStyle member.
  1438. //
  1439. // these members are IGNORED if ACMFILTERCHOOSE_STYLEF_ENABLEHOOK is not
  1440. // specified.
  1441. //
  1442. HINSTANCE hInstance; // .EXE containing cust. dlg. template
  1443. LPCWSTR pszTemplateName; // custom template name
  1444. LPARAM lCustData; // data passed to hook fn.
  1445. ACMFILTERCHOOSEHOOKPROCW pfnHook; // ptr to hook function
  1446. } ACMFILTERCHOOSEW, *PACMFILTERCHOOSEW, FAR *LPACMFILTERCHOOSEW;
  1447. #ifdef _UNICODE
  1448. #define ACMFILTERCHOOSE ACMFILTERCHOOSEW
  1449. #define PACMFILTERCHOOSE PACMFILTERCHOOSEW
  1450. #define LPACMFILTERCHOOSE LPACMFILTERCHOOSEW
  1451. #else
  1452. #define ACMFILTERCHOOSE ACMFILTERCHOOSEA
  1453. #define PACMFILTERCHOOSE PACMFILTERCHOOSEA
  1454. #define LPACMFILTERCHOOSE LPACMFILTERCHOOSEA
  1455. #endif
  1456. #else
  1457. typedef struct tACMFILTERCHOOSE
  1458. {
  1459. DWORD cbStruct; // sizeof(ACMFILTERCHOOSE)
  1460. DWORD fdwStyle; // chooser style flags
  1461. HWND hwndOwner; // caller's window handle
  1462. LPWAVEFILTER pwfltr; // ptr to wfltr buf to receive choice
  1463. DWORD cbwfltr; // size of mem buf for pwfltr
  1464. LPCSTR pszTitle;
  1465. char szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
  1466. char szFilter[ACMFILTERDETAILS_FILTER_CHARS];
  1467. LPSTR pszName; // custom name selection
  1468. DWORD cchName; // size in chars of mem buf for pszName
  1469. DWORD fdwEnum; // filter enumeration restrictions
  1470. LPWAVEFILTER pwfltrEnum; // filter describing restrictions
  1471. //
  1472. // the following members are used for custom templates only--which
  1473. // are enabled by specifying ACMFILTERCHOOSE_STYLEF_ENABLEHOOK in the
  1474. // fdwStyle member.
  1475. //
  1476. // these members are IGNORED if ACMFILTERCHOOSE_STYLEF_ENABLEHOOK is not
  1477. // specified.
  1478. //
  1479. HINSTANCE hInstance; // .EXE containing cust. dlg. template
  1480. LPCSTR pszTemplateName; // custom template name
  1481. LPARAM lCustData; // data passed to hook fn.
  1482. ACMFILTERCHOOSEHOOKPROC pfnHook; // ptr to hook function
  1483. } ACMFILTERCHOOSE, *PACMFILTERCHOOSE, FAR *LPACMFILTERCHOOSE;
  1484. #endif
  1485. //
  1486. // ACMFILTERCHOOSE.fdwStyle
  1487. //
  1488. //
  1489. #define ACMFILTERCHOOSE_STYLEF_SHOWHELP 0x00000004L
  1490. #define ACMFILTERCHOOSE_STYLEF_ENABLEHOOK 0x00000008L
  1491. #define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE 0x00000010L
  1492. #define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
  1493. #define ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT 0x00000040L
  1494. #ifdef _WIN32
  1495. MMRESULT ACMAPI acmFilterChooseA
  1496. (
  1497. LPACMFILTERCHOOSEA pafltrc
  1498. );
  1499. MMRESULT ACMAPI acmFilterChooseW
  1500. (
  1501. LPACMFILTERCHOOSEW pafltrc
  1502. );
  1503. #ifdef _UNICODE
  1504. #define acmFilterChoose acmFilterChooseW
  1505. #else
  1506. #define acmFilterChoose acmFilterChooseA
  1507. #endif
  1508. #else
  1509. MMRESULT ACMAPI acmFilterChoose
  1510. (
  1511. LPACMFILTERCHOOSE pafltrc
  1512. );
  1513. #endif
  1514. //--------------------------------------------------------------------------;
  1515. //
  1516. // ACM Stream API's
  1517. //
  1518. //
  1519. //
  1520. //--------------------------------------------------------------------------;
  1521. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1522. //
  1523. // acmStreamOpen()
  1524. //
  1525. //
  1526. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1527. typedef struct tACMSTREAMHEADER
  1528. {
  1529. DWORD cbStruct; // sizeof(ACMSTREAMHEADER)
  1530. DWORD fdwStatus; // ACMSTREAMHEADER_STATUSF_*
  1531. DWORD dwUser; // user instance data for hdr
  1532. LPBYTE pbSrc;
  1533. DWORD cbSrcLength;
  1534. DWORD cbSrcLengthUsed;
  1535. DWORD dwSrcUser; // user instance data for src
  1536. LPBYTE pbDst;
  1537. DWORD cbDstLength;
  1538. DWORD cbDstLengthUsed;
  1539. DWORD dwDstUser; // user instance data for dst
  1540. DWORD dwReservedDriver[10]; // driver reserved work space
  1541. } ACMSTREAMHEADER, *PACMSTREAMHEADER, FAR *LPACMSTREAMHEADER;
  1542. //
  1543. // ACMSTREAMHEADER.fdwStatus
  1544. //
  1545. // ACMSTREAMHEADER_STATUSF_DONE: done bit for async conversions.
  1546. //
  1547. #define ACMSTREAMHEADER_STATUSF_DONE 0x00010000L
  1548. #define ACMSTREAMHEADER_STATUSF_PREPARED 0x00020000L
  1549. #define ACMSTREAMHEADER_STATUSF_INQUEUE 0x00100000L
  1550. MMRESULT ACMAPI acmStreamOpen
  1551. (
  1552. LPHACMSTREAM phas, // pointer to stream handle
  1553. HACMDRIVER had, // optional driver handle
  1554. LPWAVEFORMATEX pwfxSrc, // source format to convert
  1555. LPWAVEFORMATEX pwfxDst, // required destination format
  1556. LPWAVEFILTER pwfltr, // optional filter
  1557. DWORD dwCallback, // callback
  1558. DWORD dwInstance, // callback instance data
  1559. DWORD fdwOpen // ACM_STREAMOPENF_* and CALLBACK_*
  1560. );
  1561. #define ACM_STREAMOPENF_QUERY 0x00000001
  1562. #define ACM_STREAMOPENF_ASYNC 0x00000002
  1563. #define ACM_STREAMOPENF_NONREALTIME 0x00000004
  1564. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1565. //
  1566. // acmStreamClose()
  1567. //
  1568. //
  1569. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1570. MMRESULT ACMAPI acmStreamClose
  1571. (
  1572. HACMSTREAM has,
  1573. DWORD fdwClose
  1574. );
  1575. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1576. //
  1577. // acmStreamSize()
  1578. //
  1579. //
  1580. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1581. MMRESULT ACMAPI acmStreamSize
  1582. (
  1583. HACMSTREAM has,
  1584. DWORD cbInput,
  1585. LPDWORD pdwOutputBytes,
  1586. DWORD fdwSize
  1587. );
  1588. #define ACM_STREAMSIZEF_SOURCE 0x00000000L
  1589. #define ACM_STREAMSIZEF_DESTINATION 0x00000001L
  1590. #define ACM_STREAMSIZEF_QUERYMASK 0x0000000FL
  1591. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1592. //
  1593. // acmStreamReset()
  1594. //
  1595. //
  1596. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1597. MMRESULT ACMAPI acmStreamReset
  1598. (
  1599. HACMSTREAM has,
  1600. DWORD fdwReset
  1601. );
  1602. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1603. //
  1604. // acmStreamConvert()
  1605. //
  1606. //
  1607. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1608. MMRESULT ACMAPI acmStreamConvert
  1609. (
  1610. HACMSTREAM has,
  1611. LPACMSTREAMHEADER pash,
  1612. DWORD fdwConvert
  1613. );
  1614. #define ACM_STREAMCONVERTF_BLOCKALIGN 0x00000004
  1615. #define ACM_STREAMCONVERTF_START 0x00000010
  1616. #define ACM_STREAMCONVERTF_END 0x00000020
  1617. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1618. //
  1619. // acmStreamPrepareHeader()
  1620. //
  1621. //
  1622. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1623. MMRESULT ACMAPI acmStreamPrepareHeader
  1624. (
  1625. HACMSTREAM has,
  1626. LPACMSTREAMHEADER pash,
  1627. DWORD fdwPrepare
  1628. );
  1629. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1630. //
  1631. // acmStreamUnprepareHeader()
  1632. //
  1633. //
  1634. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1635. MMRESULT ACMAPI acmStreamUnprepareHeader
  1636. (
  1637. HACMSTREAM has,
  1638. LPACMSTREAMHEADER pash,
  1639. DWORD fdwUnprepare
  1640. );
  1641. #ifndef RC_INVOKED
  1642. #pragma pack() /* Revert to default packing */
  1643. #endif /* RC_INVOKED */
  1644. #ifdef __cplusplus
  1645. } /* End of extern "C" { */
  1646. #endif /* __cplusplus */
  1647. #endif /* _INC_ACM */