home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / MSINC.PAK / MSACM.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  58KB  |  1,893 lines

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