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.

2014 lines
60 KiB

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