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