MSAcm.pas
上传用户:wanyu_2000
上传日期:2021-02-21
资源大小:527k
文件大小:53k
源码类别:

DVD

开发平台:

Delphi

  1. {******************************************************************}
  2. {                                                           }
  3. {       Borland Delphi Runtime Library                      }
  4. {       Microsoft Audio Compression Manager interface unit         }
  5. {     }
  6. { Portions created by Microsoft are     }
  7. { Copyright (C) 1995-1999 Microsoft Corporation.     }
  8. { All Rights Reserved.     }
  9. {     }
  10. { The original file is: msacm.h, released 9 March 1999.            }
  11. { The original Pascal code is: MSAcm.pas, released 21 July 1999.   }
  12. { The initial developer of the Pascal code is Francois Piette      }
  13. { francois.piette@swing.be, http://www.rtfm.be/fpiette/indexuk.htm }
  14. { rue de Grady 24, 4053 Embourg, Belgium                           }
  15. {     }
  16. { Portions created by Francois Piette are    }
  17. { Copyright (C) 1999 Francois Piette.                }
  18. {     }
  19. { Contributor(s): Marcel van Brakel (brakelm@bart.nl)              }
  20. {     }
  21. { Obtained through:                                           }
  22. { Joint Endeavour of Delphi Innovators (Project JEDI)              }
  23. {    }
  24. { You may retrieve the latest version of this file at the Project  }
  25. { JEDI home page, located at http://delphi-jedi.org                }
  26. {    }
  27. { The contents of this file are used with permission, subject to   }
  28. { the Mozilla Public License Version 1.1 (the "License"); you may  }
  29. { not use this file except in compliance with the License. You may }
  30. { obtain a copy of the License at                                  }
  31. { http://www.mozilla.org/NPL/NPL-1_1Final.html                     }
  32. {                                                                  }
  33. { Software distributed under the License is distributed on an     }
  34. { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or   }
  35. { implied. See the License for the specific language governing     }
  36. { rights and limitations under the License.     }
  37. {     }
  38. {******************************************************************}
  39. unit MSAcm;
  40. {$WEAKPACKAGEUNIT}
  41. interface
  42. {$HPPEMIT ''}
  43. {$HPPEMIT '#include "MSAcm.h"'}
  44. {$HPPEMIT ''}
  45. uses
  46.   Windows, MMSystem;
  47. type
  48.   PWaveFilter = ^TWaveFilter;
  49.   // Defined in mmreg.h
  50.   WAVEFILTER = packed record
  51.     cbStruct: DWORD;                    // Size of the filter in bytes
  52.     dwFilterTag: DWORD;                 // filter type
  53.     fdwFilter: DWORD;                   // Flags for the filter (Universal Dfns)
  54.     dwReserved: array [0..4] of DWORD;  // Reserved for system use
  55.   end;
  56.   TWaveFilter = WAVEFILTER;
  57. const
  58.   DRV_MAPPER_PREFERRED_INPUT_GET  = DRV_USER + 0;
  59.   {$EXTERNALSYM DRV_MAPPER_PREFERRED_INPUT_GET}
  60.   DRV_MAPPER_PREFERRED_OUTPUT_GET = DRV_USER + 2;
  61.   {$EXTERNALSYM DRV_MAPPER_PREFERRED_OUTPUT_GET}
  62.   DRVM_MAPPER_STATUS              = $2000;
  63.   {$EXTERNALSYM DRVM_MAPPER_STATUS}
  64.   WIDM_MAPPER_STATUS              = DRVM_MAPPER_STATUS + 0;
  65.   {$EXTERNALSYM WIDM_MAPPER_STATUS}
  66.   WAVEIN_MAPPER_STATUS_DEVICE     = 0;
  67.   {$EXTERNALSYM WAVEIN_MAPPER_STATUS_DEVICE}
  68.   WAVEIN_MAPPER_STATUS_MAPPED     = 1;
  69.   {$EXTERNALSYM WAVEIN_MAPPER_STATUS_MAPPED}
  70.   WAVEIN_MAPPER_STATUS_FORMAT     = 2;
  71.   {$EXTERNALSYM WAVEIN_MAPPER_STATUS_FORMAT}
  72.   WODM_MAPPER_STATUS              = DRVM_MAPPER_STATUS + 0;
  73.   {$EXTERNALSYM WODM_MAPPER_STATUS}
  74.   WAVEOUT_MAPPER_STATUS_DEVICE    = 0;
  75.   {$EXTERNALSYM WAVEOUT_MAPPER_STATUS_DEVICE}
  76.   WAVEOUT_MAPPER_STATUS_MAPPED    = 1;
  77.   {$EXTERNALSYM WAVEOUT_MAPPER_STATUS_MAPPED}
  78.   WAVEOUT_MAPPER_STATUS_FORMAT    = 2;
  79.   {$EXTERNALSYM WAVEOUT_MAPPER_STATUS_FORMAT}
  80. //--------------------------------------------------------------------------
  81. //
  82. //  ACM General API's and Defines
  83. //
  84. //--------------------------------------------------------------------------
  85. //  there are four types of 'handles' used by the ACM. the first three
  86. //  are unique types that define specific objects:
  87. //
  88. //  HACMDRIVERID: used to _identify_ an ACM driver. this identifier can be
  89. //  used to _open_ the driver for querying details, etc about the driver.
  90. //
  91. //  HACMDRIVER: used to manage a driver (codec, filter, etc). this handle
  92. //  is much like a handle to other media drivers--you use it to send
  93. //  messages to the converter, query for capabilities, etc.
  94. //
  95. //  HACMSTREAM: used to manage a 'stream' (conversion channel) with the
  96. //  ACM. you use a stream handle to convert data from one format/type
  97. //  to another--much like dealing with a file handle.
  98. //
  99. //
  100. //  the fourth handle type is a generic type used on ACM functions that
  101. //  can accept two or more of the above handle types (for example the
  102. //  acmMetrics and acmDriverID functions).
  103. //
  104. //  HACMOBJ: used to identify ACM objects. this handle is used on functions
  105. //  that can accept two or more ACM handle types.
  106. type
  107.   HACMDRIVERID__ = record
  108.     Unused: Integer;
  109.   end;
  110.   {$EXTERNALSYM HACMDRIVERID__}
  111.   HACMDRIVERID = ^HACMDRIVERID__;
  112.   {$EXTERNALSYM HACMDRIVERID}
  113.   PHACMDRIVERID = ^HACMDRIVERID;
  114.   {$EXTERNALSYM PHACMDRIVERID}
  115.   LPHACMDRIVERID = ^HACMDRIVERID;
  116.   {$EXTERNALSYM LPHACMDRIVERID}
  117.   HACMDRIVER__ = record
  118.     Unused: Integer;
  119.   end;
  120.   {$EXTERNALSYM HACMDRIVER__}
  121.   HACMDRIVER = ^HACMDRIVER__;
  122.   {$EXTERNALSYM HACMDRIVER}
  123.   PHACMDRIVER = ^HACMDRIVER;
  124.   {$EXTERNALSYM PHACMDRIVER}
  125.   LPHACMDRIVER = ^HACMDRIVER;
  126.   {$EXTERNALSYM LPHACMDRIVER}
  127.   HACMSTREAM__ = record
  128.     Unused: Integer;
  129.   end;
  130.   {$EXTERNALSYM HACMSTREAM__}
  131.   HACMSTREAM = ^HACMSTREAM__;
  132.   {$EXTERNALSYM HACMSTREAM}
  133.   PHACMSTREAM = ^HACMSTREAM;
  134.   {$EXTERNALSYM PHACMSTREAM}
  135.   LPHACMSTREAM = ^HACMSTREAM;
  136.   {$EXTERNALSYM LPHACMSTREAM}
  137.   HACMOBJ__ = record
  138.     Unused: Integer;
  139.   end;
  140.   {$EXTERNALSYM HACMOBJ__}
  141.   HACMOBJ = ^HACMOBJ__;
  142.   {$EXTERNALSYM HACMOBJ}
  143.   PHACMOBJ = ^HACMOBJ;
  144.   {$EXTERNALSYM PHACMOBJ}
  145.   LPHACMOBJ = ^HACMOBJ;
  146.   {$EXTERNALSYM LPHACMOBJ}
  147. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  148. //
  149. //  ACM Error Codes
  150. //
  151. //  Note that these error codes are specific errors that apply to the ACM
  152. //  directly--general errors are defined as MMSYSERR_*.
  153. //
  154. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  155. type
  156.   MMRESULT = UINT;
  157.   {$EXTERNALSYM MMRESULT}
  158. const
  159.   ACMERR_BASE        = 512;
  160.   {$EXTERNALSYM ACMERR_BASE}
  161.   ACMERR_NOTPOSSIBLE = (ACMERR_BASE + 0);
  162.   {$EXTERNALSYM ACMERR_NOTPOSSIBLE}
  163.   ACMERR_BUSY        = (ACMERR_BASE + 1);
  164.   {$EXTERNALSYM ACMERR_BUSY}
  165.   ACMERR_UNPREPARED  = (ACMERR_BASE + 2);
  166.   {$EXTERNALSYM ACMERR_UNPREPARED}
  167.   ACMERR_CANCELED    = (ACMERR_BASE + 3);
  168.   {$EXTERNALSYM ACMERR_CANCELED}
  169. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  170. //
  171. //  ACM Window Messages
  172. //
  173. //  These window messages are sent by the ACM or ACM drivers to notify
  174. //  applications of events.
  175. //
  176. //  Note that these window message numbers will also be defined in
  177. //  mmsystem.
  178. //
  179. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  180. const
  181.   MM_ACM_OPEN  = MM_STREAM_OPEN;     // conversion callback messages
  182.   {$EXTERNALSYM MM_ACM_OPEN}
  183.   MM_ACM_CLOSE = MM_STREAM_CLOSE;
  184.   {$EXTERNALSYM MM_ACM_CLOSE}
  185.   MM_ACM_DONE  = MM_STREAM_DONE;
  186.   {$EXTERNALSYM MM_ACM_DONE}
  187. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  188. //
  189. //  acmGetVersion()
  190. //
  191. //  the ACM version is a 32 bit number that is broken into three parts as
  192. //  follows:
  193. //
  194. //      bits 24 - 31:   8 bit _major_ version number
  195. //      bits 16 - 23:   8 bit _minor_ version number
  196. //      bits  0 - 15:   16 bit build number
  197. //
  198. //  this is then displayed as follows:
  199. //
  200. //      bMajor = (BYTE)(dwVersion >> 24)
  201. //      bMinor = (BYTE)(dwVersion >> 16) &
  202. //      wBuild = LOWORD(dwVersion)
  203. //
  204. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  205. function acmGetVersion: DWORD; stdcall;
  206. {$EXTERNALSYM acmGetVersion}
  207. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  208. //
  209. //  acmMetrics()
  210. //
  211. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  212. function acmMetrics(hao: HACMOBJ; uMetric: UINT; var pMetric): MMRESULT; stdcall;
  213. {$EXTERNALSYM acmMetrics}
  214. const
  215.   ACM_METRIC_COUNT_DRIVERS          = 1;
  216.   {$EXTERNALSYM ACM_METRIC_COUNT_DRIVERS}
  217.   ACM_METRIC_COUNT_CODECS           = 2;
  218.   {$EXTERNALSYM ACM_METRIC_COUNT_CODECS}
  219.   ACM_METRIC_COUNT_CONVERTERS       = 3;
  220.   {$EXTERNALSYM ACM_METRIC_COUNT_CONVERTERS}
  221.   ACM_METRIC_COUNT_FILTERS          = 4;
  222.   {$EXTERNALSYM ACM_METRIC_COUNT_FILTERS}
  223.   ACM_METRIC_COUNT_DISABLED         = 5;
  224.   {$EXTERNALSYM ACM_METRIC_COUNT_DISABLED}
  225.   ACM_METRIC_COUNT_HARDWARE         = 6;
  226.   {$EXTERNALSYM ACM_METRIC_COUNT_HARDWARE}
  227.   ACM_METRIC_COUNT_LOCAL_DRIVERS    = 20;
  228.   {$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_DRIVERS}
  229.   ACM_METRIC_COUNT_LOCAL_CODECS     = 21;
  230.   {$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_CODECS}
  231.   ACM_METRIC_COUNT_LOCAL_CONVERTERS = 22;
  232.   {$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_CONVERTERS}
  233.   ACM_METRIC_COUNT_LOCAL_FILTERS    = 23;
  234.   {$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_FILTERS}
  235.   ACM_METRIC_COUNT_LOCAL_DISABLED   = 24;
  236.   {$EXTERNALSYM ACM_METRIC_COUNT_LOCAL_DISABLED}
  237.   ACM_METRIC_HARDWARE_WAVE_INPUT    = 30;
  238.   {$EXTERNALSYM ACM_METRIC_HARDWARE_WAVE_INPUT}
  239.   ACM_METRIC_HARDWARE_WAVE_OUTPUT   = 31;
  240.   {$EXTERNALSYM ACM_METRIC_HARDWARE_WAVE_OUTPUT}
  241.   ACM_METRIC_MAX_SIZE_FORMAT        = 50;
  242.   {$EXTERNALSYM ACM_METRIC_MAX_SIZE_FORMAT}
  243.   ACM_METRIC_MAX_SIZE_FILTER        = 51;
  244.   {$EXTERNALSYM ACM_METRIC_MAX_SIZE_FILTER}
  245.   ACM_METRIC_DRIVER_SUPPORT         = 100;
  246.   {$EXTERNALSYM ACM_METRIC_DRIVER_SUPPORT}
  247.   ACM_METRIC_DRIVER_PRIORITY        = 101;
  248.   {$EXTERNALSYM ACM_METRIC_DRIVER_PRIORITY}
  249. //--------------------------------------------------------------------------;
  250. //
  251. //  ACM Drivers
  252. //
  253. //--------------------------------------------------------------------------;
  254. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  255. //
  256. //  acmDriverEnum()
  257. //
  258. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  259. type
  260.   ACMDRIVERENUMCB = function (hadif: HACMDRIVERID; dwInstance, fdwSupport: DWORD): BOOL; stdcall;
  261.   {$EXTERNALSYM ACMDRIVERENUMCB}
  262. function acmDriverEnum(fnCallback: ACMDRIVERENUMCB; dwInstance: DWORD;
  263.   fdwEnum: DWORD): MMRESULT; stdcall;
  264. {$EXTERNALSYM acmDriverEnum}
  265. const
  266.   ACM_DRIVERENUMF_NOLOCAL  = $40000000;
  267.   {$EXTERNALSYM ACM_DRIVERENUMF_NOLOCAL}
  268.   ACM_DRIVERENUMF_DISABLED = $80000000;
  269.   {$EXTERNALSYM ACM_DRIVERENUMF_DISABLED}
  270. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  271. //
  272. //  acmDriverID()
  273. //
  274. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  275. function acmDriverID(hao: HACMOBJ; var phadid: HACMDRIVERID; fdwDriverID: DWORD): MMRESULT; stdcall;
  276. {$EXTERNALSYM acmDriverID}
  277. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  278. //
  279. //  acmDriverAdd()
  280. //
  281. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  282. function acmDriverAddA(var phadid: HACMDRIVERID; hinstModule: HINST; Param: LPARAM;
  283.   dwPriority: DWORD; fdwAdd: DWORD): MMRESULT; stdcall;
  284. {$EXTERNALSYM acmDriverAddA}
  285. function acmDriverAddW(var phadid: HACMDRIVERID; hinstModule: HINST; Param: LPARAM;
  286.   dwPriority: DWORD; fdwAdd: DWORD): MMRESULT; stdcall;
  287. {$EXTERNALSYM acmDriverAddW}
  288. function acmDriverAdd(var phadid: HACMDRIVERID; hinstModule: HINST; Param: LPARAM;
  289.   dwPriority: DWORD; fdwAdd: DWORD): MMRESULT; stdcall;
  290. {$EXTERNALSYM acmDriverAdd}
  291. const
  292.   ACM_DRIVERADDF_FUNCTION   = $00000003; // lParam is a procedure
  293.   {$EXTERNALSYM ACM_DRIVERADDF_FUNCTION}
  294.   ACM_DRIVERADDF_NOTIFYHWND = $00000004; // lParam is notify hwnd
  295.   {$EXTERNALSYM ACM_DRIVERADDF_NOTIFYHWND}
  296.   ACM_DRIVERADDF_TYPEMASK   = $00000007; // driver type mask
  297.   {$EXTERNALSYM ACM_DRIVERADDF_TYPEMASK}
  298.   ACM_DRIVERADDF_LOCAL      = $00000000; // is local to current task
  299.   {$EXTERNALSYM ACM_DRIVERADDF_LOCAL}
  300.   ACM_DRIVERADDF_GLOBAL     = $00000008; // is global
  301.   {$EXTERNALSYM ACM_DRIVERADDF_GLOBAL}
  302. //
  303. //  prototype for ACM driver procedures that are installed as _functions_
  304. //  or _notifations_ instead of as a standalone installable driver.
  305. //
  306. type
  307.   ACMDRIVERPROC = function (dwID: DWORD; hdrvr: HACMDRIVERID; uMsg: UINT;
  308.     lParam1: LPARAM; lParam2: LPARAM) : LRESULT; stdcall;
  309.   {$EXTERNALSYM ACMDRIVERPROC}
  310.   LPACMDRIVERPROC = ^ACMDRIVERPROC;
  311.   {$EXTERNALSYM LPACMDRIVERPROC}
  312. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  313. //
  314. //  acmDriverRemove()
  315. //
  316. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  317. function acmDriverRemove(hadid: HACMDRIVERID; fdwRemove: DWORD): MMRESULT; stdcall;
  318. {$EXTERNALSYM acmDriverRemove}
  319. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  320. //
  321. //  acmDriverOpen()
  322. //
  323. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  324. function acmDriverOpen(var phad: HACMDRIVER; hadid: HACMDRIVERID; fdwOpen: DWORD): MMRESULT; stdcall;
  325. {$EXTERNALSYM acmDriverOpen}
  326. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  327. //
  328. //  acmDriverClose()
  329. //
  330. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  331. function acmDriverClose(had: HACMDRIVER; fdwClose: DWORD): MMRESULT; stdcall;
  332. {$EXTERNALSYM acmDriverClose}
  333. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  334. //
  335. //  acmDriverMessage()
  336. //
  337. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  338. function acmDriverMessage(had: HACMDRIVER; uMsg: UINT; Param1, Param2: LPARAM): LRESULT; stdcall;
  339. {$EXTERNALSYM acmDriverMessage}
  340. const
  341.   ACMDM_USER          = DRV_USER + $0000;
  342.   {$EXTERNALSYM ACMDM_USER}
  343.   ACMDM_RESERVED_LOW  = DRV_USER + $2000;
  344.   {$EXTERNALSYM ACMDM_RESERVED_LOW}
  345.   ACMDM_RESERVED_HIGH = DRV_USER + $2FFF;
  346.   {$EXTERNALSYM ACMDM_RESERVED_HIGH}
  347.   ACMDM_BASE          = ACMDM_RESERVED_LOW;
  348.   {$EXTERNALSYM ACMDM_BASE}
  349.   ACMDM_DRIVER_ABOUT  = ACMDM_BASE + 11;
  350.   {$EXTERNALSYM ACMDM_DRIVER_ABOUT}
  351. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  352. //
  353. //  acmDriverPriority
  354. //
  355. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  356. function acmDriverPriority(hadid: HACMDRIVERID; dwPriority, fdwPriority: DWORD): MMRESULT; stdcall;
  357. {$EXTERNALSYM acmDriverPriority}
  358. const
  359.   ACM_DRIVERPRIORITYF_ENABLE    = $00000001;
  360.   {$EXTERNALSYM ACM_DRIVERPRIORITYF_ENABLE}
  361.   ACM_DRIVERPRIORITYF_DISABLE   = $00000002;
  362.   {$EXTERNALSYM ACM_DRIVERPRIORITYF_DISABLE}
  363.   ACM_DRIVERPRIORITYF_ABLEMASK  = $00000003;
  364.   {$EXTERNALSYM ACM_DRIVERPRIORITYF_ABLEMASK}
  365.   ACM_DRIVERPRIORITYF_BEGIN     = $00010000;
  366.   {$EXTERNALSYM ACM_DRIVERPRIORITYF_BEGIN}
  367.   ACM_DRIVERPRIORITYF_END       = $00020000;
  368.   {$EXTERNALSYM ACM_DRIVERPRIORITYF_END}
  369.   ACM_DRIVERPRIORITYF_DEFERMASK = $00030000;
  370.   {$EXTERNALSYM ACM_DRIVERPRIORITYF_DEFERMASK}
  371. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  372. //
  373. //  acmDriverDetails()
  374. //
  375. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  376. //
  377. //  ACMDRIVERDETAILS
  378. //
  379. //  the ACMDRIVERDETAILS structure is used to get various capabilities from
  380. //  an ACM driver (codec, converter, filter).
  381. //
  382. const
  383.   ACMDRIVERDETAILS_SHORTNAME_CHARS = 32;
  384.   {$EXTERNALSYM ACMDRIVERDETAILS_SHORTNAME_CHARS}
  385.   ACMDRIVERDETAILS_LONGNAME_CHARS  = 128;
  386.   {$EXTERNALSYM ACMDRIVERDETAILS_LONGNAME_CHARS}
  387.   ACMDRIVERDETAILS_COPYRIGHT_CHARS = 80;
  388.   {$EXTERNALSYM ACMDRIVERDETAILS_COPYRIGHT_CHARS}
  389.   ACMDRIVERDETAILS_LICENSING_CHARS = 128;
  390.   {$EXTERNALSYM ACMDRIVERDETAILS_LICENSING_CHARS}
  391.   ACMDRIVERDETAILS_FEATURES_CHARS  = 512;
  392.   {$EXTERNALSYM ACMDRIVERDETAILS_FEATURES_CHARS}
  393. type
  394.   PAcmDriverDetailsA = ^TAcmDriverDetailsA;
  395.   PAcmDriverDetailsW = ^TAcmDriverDetailsW;
  396.   PAcmDriverDetails = PAcmDriverDetailsA;
  397.   _ACMDRIVERDETAILSA = packed record
  398.     cbStruct: DWORD;
  399.     fccType: FOURCC;
  400.     fccComp: FOURCC;
  401.     wMid: Word;
  402.     wPid: Word;
  403.     vdwACM: DWORD;
  404.     vdwDriver: DWORD;
  405.     fdwSupport: DWORD;
  406.     cFormatTags: DWORD;
  407.     cFilterTags: DWORD;
  408.     hicon: HICON;
  409.     szShortName: array [0..ACMDRIVERDETAILS_SHORTNAME_CHARS - 1] of AnsiChar;
  410.     szLongName: array [0..ACMDRIVERDETAILS_LONGNAME_CHARS - 1]  of AnsiChar;
  411.     szCopyright: array [0..ACMDRIVERDETAILS_COPYRIGHT_CHARS - 1] of AnsiChar;
  412.     szLicensing: array [0..ACMDRIVERDETAILS_LICENSING_CHARS - 1] of AnsiChar;
  413.     szFeatures: array [0..ACMDRIVERDETAILS_FEATURES_CHARS - 1]  of AnsiChar;
  414.   end;
  415.   {$EXTERNALSYM _ACMDRIVERDETAILSA}
  416.   _ACMDRIVERDETAILSW = packed record
  417.     cbStruct: DWORD;
  418.     fccType: FOURCC;
  419.     fccComp: FOURCC;
  420.     wMid: Word;
  421.     wPid: Word;
  422.     vdwACM: DWORD;
  423.     vdwDriver: DWORD;
  424.     fdwSupport: DWORD;
  425.     cFormatTags: DWORD;
  426.     cFilterTags: DWORD;
  427.     hicon: HICON;
  428.     szShortName: array [0..ACMDRIVERDETAILS_SHORTNAME_CHARS - 1] of WideChar;
  429.     szLongName: array [0..ACMDRIVERDETAILS_LONGNAME_CHARS - 1]  of WideChar;
  430.     szCopyright: array [0..ACMDRIVERDETAILS_COPYRIGHT_CHARS - 1] of WideChar;
  431.     szLicensing: array [0..ACMDRIVERDETAILS_LICENSING_CHARS - 1] of WideChar;
  432.     szFeatures: array [0..ACMDRIVERDETAILS_FEATURES_CHARS - 1]  of WideChar;
  433.   end;
  434.   {$EXTERNALSYM _ACMDRIVERDETAILSW}
  435.   _ACMDRIVERDETAILS = _ACMDRIVERDETAILSA;
  436.   TAcmDriverDetailsA = _ACMDRIVERDETAILSA;
  437.   TAcmDriverDetailsW = _ACMDRIVERDETAILSW;
  438.   TAcmDriverDetails = TAcmDriverDetailsA;
  439. //
  440. //  ACMDRIVERDETAILS.fccType
  441. //
  442. //  ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC: the FOURCC used in the fccType
  443. //  field of the ACMDRIVERDETAILS structure to specify that this is an ACM
  444. //  codec designed for audio.
  445. //
  446. //
  447. //  ACMDRIVERDETAILS.fccComp
  448. //
  449. //  ACMDRIVERDETAILS_FCCCOMP_UNDEFINED: the FOURCC used in the fccComp
  450. //  field of the ACMDRIVERDETAILS structure. this is currently an unused
  451. //  field.
  452. //
  453. const
  454.   ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC = $63647561;   // 'audc';
  455.   {$EXTERNALSYM ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC}
  456.   ACMDRIVERDETAILS_FCCCOMP_UNDEFINED  = 0;           // '0000';
  457.   {$EXTERNALSYM ACMDRIVERDETAILS_FCCCOMP_UNDEFINED}
  458. //
  459. //  the following flags are used to specify the type of conversion(s) that
  460. //  the converter/codec/filter supports. these are placed in the fdwSupport
  461. //  field of the ACMDRIVERDETAILS structure. note that a converter can
  462. //  support one or more of these flags in any combination.
  463. //
  464. //  ACMDRIVERDETAILS_SUPPORTF_CODEC: this flag is set if the driver supports
  465. //  conversions from one format tag to another format tag. for example, if a
  466. //  converter compresses WAVE_FORMAT_PCM to WAVE_FORMAT_ADPCM, then this bit
  467. //  should be set.
  468. //
  469. //  ACMDRIVERDETAILS_SUPPORTF_CONVERTER: this flags is set if the driver
  470. //  supports conversions on the same format tag. as an example, the PCM
  471. //  converter that is built into the ACM sets this bit (and only this bit)
  472. //  because it converts only PCM formats (bits, sample rate).
  473. //
  474. //  ACMDRIVERDETAILS_SUPPORTF_FILTER: this flag is set if the driver supports
  475. //  transformations on a single format. for example, a converter that changed
  476. //  the 'volume' of PCM data would set this bit. 'echo' and 'reverb' are
  477. //  also filter types.
  478. //
  479. //  ACMDRIVERDETAILS_SUPPORTF_HARDWARE: this flag is set if the driver supports
  480. //  hardware input and/or output through a waveform device.
  481. //
  482. //  ACMDRIVERDETAILS_SUPPORTF_ASYNC: this flag is set if the driver supports
  483. //  async conversions.
  484. //
  485. //
  486. //  ACMDRIVERDETAILS_SUPPORTF_LOCAL: this flag is set _by the ACM_ if a
  487. //  driver has been installed local to the current task. this flag is also
  488. //  set in the fdwSupport argument to the enumeration callback function
  489. //  for drivers.
  490. //
  491. //  ACMDRIVERDETAILS_SUPPORTF_DISABLED: this flag is set _by the ACM_ if a
  492. //  driver has been disabled. this flag is also passed set in the fdwSupport
  493. //  argument to the enumeration callback function for drivers.
  494. //
  495. const
  496.   ACMDRIVERDETAILS_SUPPORTF_CODEC     = $00000001;
  497.   {$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_CODEC}
  498.   ACMDRIVERDETAILS_SUPPORTF_CONVERTER = $00000002;
  499.   {$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_CONVERTER}
  500.   ACMDRIVERDETAILS_SUPPORTF_FILTER    = $00000004;
  501.   {$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_FILTER}
  502.   ACMDRIVERDETAILS_SUPPORTF_HARDWARE  = $00000008;
  503.   {$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_HARDWARE}
  504.   ACMDRIVERDETAILS_SUPPORTF_ASYNC     = $00000010;
  505.   {$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_ASYNC}
  506.   ACMDRIVERDETAILS_SUPPORTF_LOCAL     = $40000000;
  507.   {$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_LOCAL}
  508.   ACMDRIVERDETAILS_SUPPORTF_DISABLED  = $80000000;
  509.   {$EXTERNALSYM ACMDRIVERDETAILS_SUPPORTF_DISABLED}
  510. function acmDriverDetailsA(hadid: HACMDRIVERID; var padd: TAcmDriverDetailsA;
  511.   fdwDetails: DWORD): MMRESULT; stdcall;
  512. {$EXTERNALSYM acmDriverDetailsA}
  513. function acmDriverDetailsW(hadid: HACMDRIVERID; var padd: TAcmDriverDetailsW;
  514.   fdwDetails: DWORD): MMRESULT; stdcall;
  515. {$EXTERNALSYM acmDriverDetailsW}
  516. function acmDriverDetails(hadid: HACMDRIVERID; var padd: TAcmDriverDetails;
  517.   fdwDetails: DWORD): MMRESULT; stdcall;
  518. {$EXTERNALSYM acmDriverDetails}
  519. //--------------------------------------------------------------------------;
  520. //
  521. //  ACM Format Tags
  522. //
  523. //--------------------------------------------------------------------------;
  524. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  525. //
  526. //  acmFormatTagDetails()
  527. //
  528. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  529. const
  530.   ACMFORMATTAGDETAILS_FORMATTAG_CHARS = 48;
  531.   {$EXTERNALSYM ACMFORMATTAGDETAILS_FORMATTAG_CHARS}
  532. type
  533.   PAcmFormatTagDetailsA = ^TAcmFormatTagDetailsA;
  534.   PAcmFormatTagDetailsW = ^TAcmFormatTagDetailsW;
  535.   PAcmFormatTagDetails = PAcmFormatTagDetailsA;
  536.   _ACMFORMATTAGDETAILSA = packed record
  537.     cbStruct: DWORD;
  538.     dwFormatTagIndex: DWORD;
  539.     dwFormatTag: DWORD;
  540.     cbFormatSize: DWORD;
  541.     fdwSupport: DWORD;
  542.     cStandardFormats: DWORD;
  543.     szFormatTag: array [0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS - 1] of AnsiChar;
  544.   end;
  545.   {$EXTERNALSYM _ACMFORMATTAGDETAILSA}
  546.   _ACMFORMATTAGDETAILSW = packed record
  547.     cbStruct: DWORD;
  548.     dwFormatTagIndex: DWORD;
  549.     dwFormatTag: DWORD;
  550.     cbFormatSize: DWORD;
  551.     fdwSupport: DWORD;
  552.     cStandardFormats: DWORD;
  553.     szFormatTag: array [0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS - 1] of WideChar;
  554.   end;
  555.   {$EXTERNALSYM _ACMFORMATTAGDETAILSW}
  556.   _ACMFORMATTAGDETAILS = _ACMFORMATTAGDETAILSA;
  557.   TAcmFormatTagDetailsA = _ACMFORMATTAGDETAILSA;
  558.   TAcmFormatTagDetailsW = _ACMFORMATTAGDETAILSW;
  559.   TAcmFormatTagDetails = TAcmFormatTagDetailsA;
  560. function acmFormatTagDetailsA(had: HACMDRIVER; var paftd: TAcmFormatTagDetailsA;
  561.   fdwDetails: DWORD): MMRESULT; stdcall;
  562. {$EXTERNALSYM acmFormatTagDetailsA}
  563. function acmFormatTagDetailsW(had: HACMDRIVER; var paftd: TAcmFormatTagDetailsW;
  564.   fdwDetails: DWORD): MMRESULT; stdcall;
  565. {$EXTERNALSYM acmFormatTagDetailsW}
  566. function acmFormatTagDetails(had: HACMDRIVER; var paftd: TAcmFormatTagDetails;
  567.   fdwDetails: DWORD): MMRESULT; stdcall;
  568. {$EXTERNALSYM acmFormatTagDetails}
  569. const
  570.   ACM_FORMATTAGDETAILSF_INDEX       = $00000000;
  571.   {$EXTERNALSYM ACM_FORMATTAGDETAILSF_INDEX}
  572.   ACM_FORMATTAGDETAILSF_FORMATTAG   = $00000001;
  573.   {$EXTERNALSYM ACM_FORMATTAGDETAILSF_FORMATTAG}
  574.   ACM_FORMATTAGDETAILSF_LARGESTSIZE = $00000002;
  575.   {$EXTERNALSYM ACM_FORMATTAGDETAILSF_LARGESTSIZE}
  576.   ACM_FORMATTAGDETAILSF_QUERYMASK   = $0000000F;
  577.   {$EXTERNALSYM ACM_FORMATTAGDETAILSF_QUERYMASK}
  578. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  579. //
  580. //  acmFormatTagEnum()
  581. //
  582. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  583. type
  584.   ACMFORMATTAGENUMCBA = function (hadid: HACMDRIVERID; paftd: PAcmFormatTagDetailsA;
  585.     dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;
  586.   {$EXTERNALSYM ACMFORMATTAGENUMCBA}
  587.   ACMFORMATTAGENUMCBW = function (hadid: HACMDRIVERID; paftd: PAcmFormatTagDetailsW;
  588.     dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;
  589.   {$EXTERNALSYM ACMFORMATTAGENUMCBW}
  590.   ACMFORMATTAGENUMCB = ACMFORMATTAGENUMCBA;
  591. function acmFormatTagEnumA(had: HACMDRIVER; var paftd: TAcmFormatTagDetailsA;
  592.   fnCallback: ACMFORMATTAGENUMCBA; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
  593. {$EXTERNALSYM acmFormatTagEnumA}
  594. function acmFormatTagEnumW(had: HACMDRIVER; var paftd: TAcmFormatTagDetailsW;
  595.   fnCallback: ACMFORMATTAGENUMCBW; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
  596. {$EXTERNALSYM acmFormatTagEnumW}
  597. function acmFormatTagEnum(had: HACMDRIVER; var paftd: TAcmFormatTagDetails;
  598.   fnCallback: ACMFORMATTAGENUMCB; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
  599. {$EXTERNALSYM acmFormatTagEnum}
  600. //--------------------------------------------------------------------------;
  601. //
  602. //  ACM Formats
  603. //
  604. //--------------------------------------------------------------------------;
  605. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  606. //
  607. //  acmFormatDetails()
  608. //
  609. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  610. const
  611.   ACMFORMATDETAILS_FORMAT_CHARS = 128;
  612.   {$EXTERNALSYM ACMFORMATDETAILS_FORMAT_CHARS}
  613. type
  614.   PAcmFormatDetailsA = ^TAcmFormatDetailsA;
  615.   PAcmFormatDetailsW = ^TAcmFormatDetailsW;
  616.   PAcmFormatDetails = PAcmFormatDetailsA;
  617.   _ACMFORMATDETAILSA = packed record
  618.     cbStruct: DWORD;
  619.     dwFormatIndex: DWORD;
  620.     dwFormatTag: DWORD;
  621.     fdwSupport: DWORD;
  622.     pwfx: PWAVEFORMATEX;
  623.     cbwfx: DWORD;
  624.     szFormat: array [0..ACMFORMATDETAILS_FORMAT_CHARS - 1] of AnsiChar;
  625.   end;
  626.   {$EXTERNALSYM _ACMFORMATDETAILSA}
  627.   _ACMFORMATDETAILSW = packed record
  628.     cbStruct: DWORD;
  629.     dwFormatIndex: DWORD;
  630.     dwFormatTag: DWORD;
  631.     fdwSupport: DWORD;
  632.     pwfx: PWAVEFORMATEX;
  633.     cbwfx: DWORD;
  634.     szFormat: array [0..ACMFORMATDETAILS_FORMAT_CHARS - 1] of WideChar;
  635.   end;
  636.   {$EXTERNALSYM _ACMFORMATDETAILSW}
  637.   _ACMFORMATDETAILS = _ACMFORMATDETAILSA;
  638.   TAcmFormatDetailsA = _ACMFORMATDETAILSA;
  639.   TAcmFormatDetailsW = _ACMFORMATDETAILSW;
  640.   TAcmFormatDetails = TAcmFormatDetailsA;
  641. function acmFormatDetailsA(had: HACMDRIVER; var pafd: TAcmFormatDetailsA;
  642.   fdwDetails: DWORD): MMRESULT; stdcall;
  643. {$EXTERNALSYM acmFormatDetailsA}
  644. function acmFormatDetailsW(had: HACMDRIVER; var pafd: TAcmFormatDetailsW;
  645.   fdwDetails: DWORD): MMRESULT; stdcall;
  646. {$EXTERNALSYM acmFormatDetailsW}
  647. function acmFormatDetails(had: HACMDRIVER; var pafd: TAcmFormatDetails;
  648.   fdwDetails: DWORD): MMRESULT; stdcall;
  649. {$EXTERNALSYM acmFormatDetails}
  650. const
  651.   ACM_FORMATDETAILSF_INDEX     = $00000000;
  652.   {$EXTERNALSYM ACM_FORMATDETAILSF_INDEX}
  653.   ACM_FORMATDETAILSF_FORMAT    = $00000001;
  654.   {$EXTERNALSYM ACM_FORMATDETAILSF_FORMAT}
  655.   ACM_FORMATDETAILSF_QUERYMASK = $0000000F;
  656.   {$EXTERNALSYM ACM_FORMATDETAILSF_QUERYMASK}
  657. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  658. //
  659. //  acmFormatEnum()
  660. //
  661. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  662. type
  663.   ACMFORMATENUMCBA = function (hadid:HACMDRIVERID; pafd: PAcmFormatDetailsA;
  664.     dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;
  665.   {$EXTERNALSYM ACMFORMATENUMCBA}
  666.   ACMFORMATENUMCBW = function (hadid:HACMDRIVERID; pafd: PAcmFormatDetailsW;
  667.     dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;
  668.   {$EXTERNALSYM ACMFORMATENUMCBW}
  669.   ACMFORMATENUMCB = ACMFORMATENUMCBA;
  670. function acmFormatEnumA(had: HACMDRIVER; var pafd: TAcmFormatDetailsA;
  671.   fnCallback: ACMFORMATENUMCBA; dwInstance, fdwEnum: DWORD): MMRESULT; stdcall;
  672. {$EXTERNALSYM acmFormatEnumA}
  673. function acmFormatEnumW(had: HACMDRIVER; var pafd: TAcmFormatDetailsW;
  674.   fnCallback: ACMFORMATENUMCBW; dwInstance, fdwEnum: DWORD): MMRESULT; stdcall;
  675. {$EXTERNALSYM acmFormatEnumW}
  676. function acmFormatEnum(had: HACMDRIVER; var pafd: TAcmFormatDetails;
  677.   fnCallback: ACMFORMATENUMCB; dwInstance, fdwEnum: DWORD): MMRESULT; stdcall;
  678. {$EXTERNALSYM acmFormatEnum}
  679. const
  680.   ACM_FORMATENUMF_WFORMATTAG     = $00010000;
  681.   {$EXTERNALSYM ACM_FORMATENUMF_WFORMATTAG}
  682.   ACM_FORMATENUMF_NCHANNELS      = $00020000;
  683.   {$EXTERNALSYM ACM_FORMATENUMF_NCHANNELS}
  684.   ACM_FORMATENUMF_NSAMPLESPERSEC = $00040000;
  685.   {$EXTERNALSYM ACM_FORMATENUMF_NSAMPLESPERSEC}
  686.   ACM_FORMATENUMF_WBITSPERSAMPLE = $00080000;
  687.   {$EXTERNALSYM ACM_FORMATENUMF_WBITSPERSAMPLE}
  688.   ACM_FORMATENUMF_CONVERT        = $00100000;
  689.   {$EXTERNALSYM ACM_FORMATENUMF_CONVERT}
  690.   ACM_FORMATENUMF_SUGGEST        = $00200000;
  691.   {$EXTERNALSYM ACM_FORMATENUMF_SUGGEST}
  692.   ACM_FORMATENUMF_HARDWARE       = $00400000;
  693.   {$EXTERNALSYM ACM_FORMATENUMF_HARDWARE}
  694.   ACM_FORMATENUMF_INPUT          = $00800000;
  695.   {$EXTERNALSYM ACM_FORMATENUMF_INPUT}
  696.   ACM_FORMATENUMF_OUTPUT         = $01000000;
  697.   {$EXTERNALSYM ACM_FORMATENUMF_OUTPUT}
  698. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  699. //
  700. //  acmFormatSuggest()
  701. //
  702. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  703. function acmFormatSuggest(had: HACMDRIVER; var pwfxSrc: TWAVEFORMATEX;
  704.   var pwfxDst: TWAVEFORMATEX; cbwfxDst: DWORD; fdwSuggest: DWORD): MMRESULT; stdcall;
  705. {$EXTERNALSYM acmFormatSuggest}
  706. const
  707.   ACM_FORMATSUGGESTF_WFORMATTAG     = $00010000;
  708.   {$EXTERNALSYM ACM_FORMATSUGGESTF_WFORMATTAG}
  709.   ACM_FORMATSUGGESTF_NCHANNELS      = $00020000;
  710.   {$EXTERNALSYM ACM_FORMATSUGGESTF_NCHANNELS}
  711.   ACM_FORMATSUGGESTF_NSAMPLESPERSEC = $00040000;
  712.   {$EXTERNALSYM ACM_FORMATSUGGESTF_NSAMPLESPERSEC}
  713.   ACM_FORMATSUGGESTF_WBITSPERSAMPLE = $00080000;
  714.   {$EXTERNALSYM ACM_FORMATSUGGESTF_WBITSPERSAMPLE}
  715.   ACM_FORMATSUGGESTF_TYPEMASK       = $00FF0000;
  716.   {$EXTERNALSYM ACM_FORMATSUGGESTF_TYPEMASK}
  717. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  718. //
  719. //  acmFormatChoose()
  720. //
  721. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  722. const
  723.   ACMHELPMSGSTRINGA      = 'acmchoose_help';
  724.   {$EXTERNALSYM ACMHELPMSGSTRINGA}
  725.   ACMHELPMSGSTRINGW      = 'acmchoose_help';
  726.   {$EXTERNALSYM ACMHELPMSGSTRINGW}
  727.   ACMHELPMSGSTRING = ACMHELPMSGSTRINGA;
  728.   ACMHELPMSGCONTEXTMENUA = 'acmchoose_contextmenu';
  729.   {$EXTERNALSYM ACMHELPMSGCONTEXTMENUA}
  730.   ACMHELPMSGCONTEXTMENUW = 'acmchoose_contextmenu';
  731.   {$EXTERNALSYM ACMHELPMSGCONTEXTMENUW}
  732.   ACMHELPMSGCONTEXTMENU = ACMHELPMSGCONTEXTMENUA;
  733.   ACMHELPMSGCONTEXTHELPA = 'acmchoose_contexthelp';
  734.   {$EXTERNALSYM ACMHELPMSGCONTEXTHELPA}
  735.   ACMHELPMSGCONTEXTHELPW = 'acmchoose_contexthelp';
  736.   {$EXTERNALSYM ACMHELPMSGCONTEXTHELPW}
  737.   ACMHELPMSGCONTEXTHELP = ACMHELPMSGCONTEXTHELPA;
  738. //
  739. //  MM_ACM_FORMATCHOOSE is sent to hook callbacks by the Format Chooser
  740. //  Dialog...
  741. //
  742. const
  743.   MM_ACM_FORMATCHOOSE           = $8000;
  744.   {$EXTERNALSYM MM_ACM_FORMATCHOOSE}
  745.   FORMATCHOOSE_MESSAGE          = 0;
  746.   {$EXTERNALSYM FORMATCHOOSE_MESSAGE}
  747.   FORMATCHOOSE_FORMATTAG_VERIFY = FORMATCHOOSE_MESSAGE + 0;
  748.   {$EXTERNALSYM FORMATCHOOSE_FORMATTAG_VERIFY}
  749.   FORMATCHOOSE_FORMAT_VERIFY    = FORMATCHOOSE_MESSAGE + 1;
  750.   {$EXTERNALSYM FORMATCHOOSE_FORMAT_VERIFY}
  751.   FORMATCHOOSE_CUSTOM_VERIFY    = FORMATCHOOSE_MESSAGE + 2;
  752.   {$EXTERNALSYM FORMATCHOOSE_CUSTOM_VERIFY}
  753. type
  754.   ACMFORMATCHOOSEHOOKPROCA = function (hwnd: HWND; uMsg: UINT; wParam: WPARAM;
  755.     lParam: LPARAM): UINT; stdcall;
  756.   {$EXTERNALSYM ACMFORMATCHOOSEHOOKPROCA}
  757.   ACMFORMATCHOOSEHOOKPROCW = function (hwnd: HWND; uMsg: UINT; wParam: WPARAM;
  758.     lParam: LPARAM): UINT; stdcall;
  759.   {$EXTERNALSYM ACMFORMATCHOOSEHOOKPROCW}
  760.   ACMFORMATCHOOSEHOOKPROC = ACMFORMATCHOOSEHOOKPROCA;
  761.   PAcmFormatChooseA = ^TAcmFormatChooseA;
  762.   PAcmFormatChooseW = ^TAcmFormatChooseW;
  763.   PAcmFormatChoose = PAcmFormatChooseA;
  764.   _ACMFORMATCHOOSEA = packed record
  765.     cbStruct: DWORD;
  766.     fdwStyle: DWORD;
  767.     hwndOwner: HWND;
  768.     pwfx: PWAVEFORMATEX;
  769.     cbwfx: DWORD;
  770.     pszTitle: PAnsiChar;
  771.     szFormatTag: array [0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS-1] of AnsiChar;
  772.     szFormat: array [0..ACMFORMATDETAILS_FORMAT_CHARS-1] of AnsiChar;
  773.     pszName: PAnsiChar;
  774.     cchName: DWORD;
  775.     fdwEnum: DWORD;
  776.     pwfxEnum: PWAVEFORMATEX;
  777.     hInstance: HINST;
  778.     pszTemplateName: PAnsiChar;
  779.     lCustData: LPARAM;
  780.     pfnHook: ACMFORMATCHOOSEHOOKPROCA;
  781.   end;
  782.   {$EXTERNALSYM _ACMFORMATCHOOSEA}
  783.   _ACMFORMATCHOOSEW = packed record
  784.     cbStruct: DWORD;
  785.     fdwStyle: DWORD;
  786.     hwndOwner: HWND;
  787.     pwfx: PWAVEFORMATEX;
  788.     cbwfx: DWORD;
  789.     pszTitle: PWideChar;
  790.     szFormatTag: array [0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS-1] of WideChar;
  791.     szFormat: array [0..ACMFORMATDETAILS_FORMAT_CHARS-1] of WideChar;
  792.     pszName: PWideChar;
  793.     cchName: DWORD;
  794.     fdwEnum: DWORD;
  795.     pwfxEnum: PWAVEFORMATEX;
  796.     hInstance: HINST;
  797.     pszTemplateName: PWideChar;
  798.     lCustData: LPARAM;
  799.     pfnHook: ACMFORMATCHOOSEHOOKPROCW;
  800.   end;
  801.   {$EXTERNALSYM _ACMFORMATCHOOSEW}
  802.   _ACMFORMATCHOOSE = _ACMFORMATCHOOSEA;
  803.   TAcmFormatChooseA = _ACMFORMATCHOOSEA;
  804.   TAcmFormatChooseW = _ACMFORMATCHOOSEW;
  805.   TAcmFormatChoose = TAcmFormatChooseA;
  806. //
  807. //  ACMFORMATCHOOSE.fdwStyle
  808. //
  809. const
  810.   ACMFORMATCHOOSE_STYLEF_SHOWHELP             = $00000004;
  811.   {$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_SHOWHELP}
  812.   ACMFORMATCHOOSE_STYLEF_ENABLEHOOK           = $00000008;
  813.   {$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_ENABLEHOOK}
  814.   ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE       = $00000010;
  815.   {$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE}
  816.   ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE = $00000020;
  817.   {$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE}
  818.   ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT      = $00000040;
  819.   {$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT}
  820.   ACMFORMATCHOOSE_STYLEF_CONTEXTHELP          = $00000080;
  821.   {$EXTERNALSYM ACMFORMATCHOOSE_STYLEF_CONTEXTHELP}
  822. function acmFormatChooseA(var pafmtc: TAcmFormatChooseA): MMRESULT; stdcall;
  823. {$EXTERNALSYM acmFormatChooseA}
  824. function acmFormatChooseW(var pafmtc: TAcmFormatChooseW): MMRESULT; stdcall;
  825. {$EXTERNALSYM acmFormatChooseW}
  826. function acmFormatChoose(var pafmtc: TAcmFormatChoose): MMRESULT; stdcall;
  827. {$EXTERNALSYM acmFormatChoose}
  828. //--------------------------------------------------------------------------;
  829. //
  830. //  ACM Filter Tags
  831. //
  832. //--------------------------------------------------------------------------;
  833. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  834. //
  835. //  acmFilterTagDetails()
  836. //
  837. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  838. const
  839.   ACMFILTERTAGDETAILS_FILTERTAG_CHARS = 48;
  840.   {$EXTERNALSYM ACMFILTERTAGDETAILS_FILTERTAG_CHARS}
  841. type
  842.   PAcmFilterTagDetailsA = ^TAcmFilterTagDetailsA;
  843.   PAcmFilterTagDetailsW = ^TAcmFilterTagDetailsW;
  844.   PAcmFilterTagDetails = PAcmFilterTagDetailsA;
  845.   _ACMFILTERTAGDETAILSA = packed record
  846.     cbStruct: DWORD;
  847.     dwFilterTagIndex: DWORD;
  848.     dwFilterTag: DWORD;
  849.     cbFilterSize: DWORD;
  850.     fdwSupport: DWORD;
  851.     cStandardFilters: DWORD;
  852.     szFilterTag: array [0..ACMFILTERTAGDETAILS_FILTERTAG_CHARS-1] of AnsiChar;
  853.   end;
  854.   {$EXTERNALSYM _ACMFILTERTAGDETAILSA}
  855.   _ACMFILTERTAGDETAILSW = packed record
  856.     cbStruct: DWORD;
  857.     dwFilterTagIndex: DWORD;
  858.     dwFilterTag: DWORD;
  859.     cbFilterSize: DWORD;
  860.     fdwSupport: DWORD;
  861.     cStandardFilters: DWORD;
  862.     szFilterTag: array [0..ACMFILTERTAGDETAILS_FILTERTAG_CHARS-1] of WideChar;
  863.   end;
  864.   {$EXTERNALSYM _ACMFILTERTAGDETAILSW}
  865.   _ACMFILTERTAGDETAILS = _ACMFILTERTAGDETAILSA;
  866.   TAcmFilterTagDetailsA = _ACMFILTERTAGDETAILSA;
  867.   TAcmFilterTagDetailsW = _ACMFILTERTAGDETAILSW;
  868.   TAcmFilterTagDetails = TAcmFilterTagDetailsA;
  869. function acmFilterTagDetailsA(had: HACMDRIVER; var paftd: TAcmFilterTagDetailsA;
  870.   fdwDetails: DWORD): MMRESULT; stdcall;
  871. {$EXTERNALSYM acmFilterTagDetailsA}
  872. function acmFilterTagDetailsW(had: HACMDRIVER; var paftd: TAcmFilterTagDetailsW;
  873.   fdwDetails: DWORD): MMRESULT; stdcall;
  874. {$EXTERNALSYM acmFilterTagDetailsW}
  875. function acmFilterTagDetails(had: HACMDRIVER; var paftd: TAcmFilterTagDetails;
  876.   fdwDetails: DWORD): MMRESULT; stdcall;
  877. {$EXTERNALSYM acmFilterTagDetails}
  878. const
  879.   ACM_FILTERTAGDETAILSF_INDEX       = $00000000;
  880.   {$EXTERNALSYM ACM_FILTERTAGDETAILSF_INDEX}
  881.   ACM_FILTERTAGDETAILSF_FILTERTAG   = $00000001;
  882.   {$EXTERNALSYM ACM_FILTERTAGDETAILSF_FILTERTAG}
  883.   ACM_FILTERTAGDETAILSF_LARGESTSIZE = $00000002;
  884.   {$EXTERNALSYM ACM_FILTERTAGDETAILSF_LARGESTSIZE}
  885.   ACM_FILTERTAGDETAILSF_QUERYMASK   = $0000000F;
  886.   {$EXTERNALSYM ACM_FILTERTAGDETAILSF_QUERYMASK}
  887. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  888. //
  889. //  acmFilterTagEnum()
  890. //
  891. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  892. type
  893.   ACMFILTERTAGENUMCBA = function (hadid: HACMDRIVERID; paftd: PAcmFilterTagDetailsA;
  894.     dwInstance: DWORD; fdwSupport: DWORD) : BOOL; stdcall;
  895.   {$EXTERNALSYM ACMFILTERTAGENUMCBA}
  896.   ACMFILTERTAGENUMCBW = function (hadid: HACMDRIVERID; paftd: PAcmFilterTagDetailsW;
  897.     dwInstance: DWORD; fdwSupport: DWORD) : BOOL; stdcall;
  898.   {$EXTERNALSYM ACMFILTERTAGENUMCBW}
  899.   ACMFILTERTAGENUMCB = ACMFILTERTAGENUMCBA;
  900. function acmFilterTagEnumA(had: HACMDRIVER; var paftd: TAcmFilterTagDetailsA;
  901.   fnCallback: ACMFILTERTAGENUMCBA; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
  902. {$EXTERNALSYM acmFilterTagEnumA}
  903. function acmFilterTagEnumW(had: HACMDRIVER; var paftd: TAcmFilterTagDetailsW;
  904.   fnCallback: ACMFILTERTAGENUMCBW; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
  905. {$EXTERNALSYM acmFilterTagEnumW}
  906. function acmFilterTagEnum(had: HACMDRIVER; var paftd: TAcmFilterTagDetails;
  907.   fnCallback: ACMFILTERTAGENUMCB; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
  908. {$EXTERNALSYM acmFilterTagEnum}
  909. //--------------------------------------------------------------------------;
  910. //
  911. //  ACM Filters
  912. //
  913. //--------------------------------------------------------------------------;
  914. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  915. //
  916. //  acmFilterDetails()
  917. //
  918. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  919. const
  920.   ACMFILTERDETAILS_FILTER_CHARS = 128;
  921.   {$EXTERNALSYM ACMFILTERDETAILS_FILTER_CHARS}
  922. type
  923.   PAcmFilterDetailsA = ^TAcmFilterDetailsA;
  924.   PAcmFilterDetailsW = ^TAcmFilterDetailsW;
  925.   PAcmFilterDetails = PAcmFilterDetailsA;
  926.   _ACMFILTERDETAILSA = packed record
  927.     cbStruct: DWORD;
  928.     dwFilterIndex: DWORD;
  929.     dwFilterTag: DWORD;
  930.     fdwSupport: DWORD;
  931.     pwfltr: PWAVEFILTER;
  932.     cbwfltr: DWORD;
  933.     szFilter: array [0..ACMFILTERDETAILS_FILTER_CHARS - 1] of AnsiChar;
  934.   end;
  935.   {$EXTERNALSYM _ACMFILTERDETAILSA}
  936.   _ACMFILTERDETAILSW = packed record
  937.     cbStruct: DWORD;
  938.     dwFilterIndex: DWORD;
  939.     dwFilterTag: DWORD;
  940.     fdwSupport: DWORD;
  941.     pwfltr: PWAVEFILTER;
  942.     cbwfltr: DWORD;
  943.     szFilter: array [0..ACMFILTERDETAILS_FILTER_CHARS - 1] of WideChar;
  944.   end;
  945.   {$EXTERNALSYM _ACMFILTERDETAILSW}
  946.   _ACMFILTERDETAILS = _ACMFILTERDETAILSA;
  947.   TAcmFilterDetailsA = _ACMFILTERDETAILSA;
  948.   TAcmFilterDetailsW = _ACMFILTERDETAILSW;
  949.   TAcmFilterDetails = TAcmFilterDetailsA;
  950. function acmFilterDetailsA(had: HACMDRIVER; var pafd: TAcmFilterDetailsA;
  951.   fdwDetails: DWORD): MMRESULT; stdcall;
  952. {$EXTERNALSYM acmFilterDetailsA}
  953. function acmFilterDetailsW(had: HACMDRIVER; var pafd: TAcmFilterDetailsW;
  954.   fdwDetails: DWORD): MMRESULT; stdcall;
  955. {$EXTERNALSYM acmFilterDetailsW}
  956. function acmFilterDetails(had: HACMDRIVER; var pafd: TAcmFilterDetails;
  957.   fdwDetails: DWORD): MMRESULT; stdcall;
  958. {$EXTERNALSYM acmFilterDetails}
  959. const
  960.   ACM_FILTERDETAILSF_INDEX     = $00000000;
  961.   {$EXTERNALSYM ACM_FILTERDETAILSF_INDEX}
  962.   ACM_FILTERDETAILSF_FILTER    = $00000001;
  963.   {$EXTERNALSYM ACM_FILTERDETAILSF_FILTER}
  964.   ACM_FILTERDETAILSF_QUERYMASK = $0000000F;
  965.   {$EXTERNALSYM ACM_FILTERDETAILSF_QUERYMASK}
  966. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  967. //
  968. //  acmFilterEnum()
  969. //
  970. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  971. type
  972.   ACMFILTERENUMCBA = function (hadid: HACMDRIVERID; pafd: PAcmFilterDetailsA;
  973.     dwInstance: DWORD; fdwSupport: DWORD) : BOOL; stdcall;
  974.   ACMFILTERENUMCBW = function (hadid: HACMDRIVERID; pafd: PAcmFilterDetailsW;
  975.     dwInstance: DWORD; fdwSupport: DWORD) : BOOL; stdcall;
  976.   ACMFILTERENUMCB = ACMFILTERENUMCBA;
  977. function acmFilterEnumA(had: HACMDRIVER; var pafd: TAcmFilterDetailsA;
  978.   fnCallback: ACMFILTERENUMCBA; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
  979. {$EXTERNALSYM acmFilterEnumA}
  980. function acmFilterEnumW(had: HACMDRIVER; var pafd: TAcmFilterDetailsW;
  981.   fnCallback: ACMFILTERENUMCBW; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
  982. {$EXTERNALSYM acmFilterEnumW}
  983. function acmFilterEnum(had: HACMDRIVER; var pafd: TAcmFilterDetails;
  984.   fnCallback: ACMFILTERENUMCB; dwInstance: DWORD; fdwEnum: DWORD): MMRESULT; stdcall;
  985. {$EXTERNALSYM acmFilterEnum}
  986. const
  987.   ACM_FILTERENUMF_DWFILTERTAG = $00010000;
  988.   {$EXTERNALSYM ACM_FILTERENUMF_DWFILTERTAG}
  989. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  990. //
  991. //  acmFilterChoose()
  992. //
  993. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  994. //
  995. //  MM_ACM_FILTERCHOOSE is sent to hook callbacks by the Filter Chooser
  996. //  Dialog...
  997. //
  998. const
  999.   MM_ACM_FILTERCHOOSE           = $8000;
  1000.   {$EXTERNALSYM MM_ACM_FILTERCHOOSE}
  1001.   FILTERCHOOSE_MESSAGE          = 0;
  1002.   {$EXTERNALSYM FILTERCHOOSE_MESSAGE}
  1003.   FILTERCHOOSE_FILTERTAG_VERIFY = FILTERCHOOSE_MESSAGE + 0;
  1004.   {$EXTERNALSYM FILTERCHOOSE_FILTERTAG_VERIFY}
  1005.   FILTERCHOOSE_FILTER_VERIFY    = FILTERCHOOSE_MESSAGE + 1;
  1006.   {$EXTERNALSYM FILTERCHOOSE_FILTER_VERIFY}
  1007.   FILTERCHOOSE_CUSTOM_VERIFY    = FILTERCHOOSE_MESSAGE + 2;
  1008.   {$EXTERNALSYM FILTERCHOOSE_CUSTOM_VERIFY}
  1009. type
  1010.   ACMFILTERCHOOSEHOOKPROCA = function (hwd: HWND; uMsg: UINT; wParam: WPARAM;
  1011.     lParam: LPARAM): UINT; stdcall;
  1012.   {$EXTERNALSYM ACMFILTERCHOOSEHOOKPROCA}
  1013.   ACMFILTERCHOOSEHOOKPROCW = function (hwd: HWND; uMsg: UINT; wParam: WPARAM;
  1014.     lParam: LPARAM): UINT; stdcall;
  1015.   {$EXTERNALSYM ACMFILTERCHOOSEHOOKPROCW}
  1016.   ACMFILTERCHOOSEHOOKPROC = ACMFILTERCHOOSEHOOKPROCA;
  1017. //
  1018. //  ACMFILTERCHOOSE
  1019. //
  1020. //
  1021. type
  1022.   PAcmFilterChooseA = ^TAcmFilterChooseA;
  1023.   PAcmFilterChooseW = ^TAcmFilterChooseW;
  1024.   PAcmFilterChoose = PAcmFilterChooseA;
  1025.   _ACMFILTERCHOOSEA = packed record
  1026.     cbStruct: DWORD;
  1027.     fdwStyle: DWORD;
  1028.     hwndOwner: HWND;
  1029.     pwfltr: PWAVEFILTER;
  1030.     cbwfltr: DWORD;
  1031.     pszTitle: PAnsiChar;
  1032.     szFilterTag: array [0..ACMFILTERTAGDETAILS_FILTERTAG_CHARS - 1] of AnsiChar;
  1033.     szFilter: array [0..ACMFILTERDETAILS_FILTER_CHARS - 1] of AnsiChar;
  1034.     pszName: PAnsiChar;
  1035.     cchName: DWORD;
  1036.     fdwEnum: DWORD;
  1037.     pwfltrEnum: PWAVEFILTER;
  1038.     hInstance: HINST;
  1039.     pszTemplateName: PAnsiChar;
  1040.     lCustData: LPARAM;
  1041.     pfnHook: ACMFILTERCHOOSEHOOKPROCA;
  1042.   end;
  1043.   {$EXTERNALSYM _ACMFILTERCHOOSEA}
  1044.   _ACMFILTERCHOOSEW = packed record
  1045.     cbStruct: DWORD;
  1046.     fdwStyle: DWORD;
  1047.     hwndOwner: HWND;
  1048.     pwfltr: PWAVEFILTER;
  1049.     cbwfltr: DWORD;
  1050.     pszTitle: PWideChar;
  1051.     szFilterTag: array [0..ACMFILTERTAGDETAILS_FILTERTAG_CHARS - 1] of WideChar;
  1052.     szFilter: array [0..ACMFILTERDETAILS_FILTER_CHARS - 1] of WideChar;
  1053.     pszName: PWideChar;
  1054.     cchName: DWORD;
  1055.     fdwEnum: DWORD;
  1056.     pwfltrEnum: PWAVEFILTER;
  1057.     hInstance: HINST;
  1058.     pszTemplateName: PWideChar;
  1059.     lCustData: LPARAM;
  1060.     pfnHook: ACMFILTERCHOOSEHOOKPROCW;
  1061.   end;
  1062.   {$EXTERNALSYM _ACMFILTERCHOOSEW}
  1063.   _ACMFILTERCHOOSE = _ACMFILTERCHOOSEA;
  1064.   TAcmFilterChooseA = _ACMFILTERCHOOSEA;
  1065.   TAcmFilterChooseW = _ACMFILTERCHOOSEW;
  1066.   TAcmFilterChoose = TAcmFilterChooseA;
  1067. //
  1068. //  ACMFILTERCHOOSE.fdwStyle
  1069. //
  1070. const
  1071.   ACMFILTERCHOOSE_STYLEF_SHOWHELP             = $00000004;
  1072.   {$EXTERNALSYM ACMFILTERCHOOSE_STYLEF_SHOWHELP}
  1073.   ACMFILTERCHOOSE_STYLEF_ENABLEHOOK           = $00000008;
  1074.   {$EXTERNALSYM ACMFILTERCHOOSE_STYLEF_ENABLEHOOK}
  1075.   ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE       = $00000010;
  1076.   {$EXTERNALSYM ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE}
  1077.   ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE = $00000020;
  1078.   {$EXTERNALSYM ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE}
  1079.   ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT   = $00000040;
  1080.   {$EXTERNALSYM ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT}
  1081.   ACMFILTERCHOOSE_STYLEF_CONTEXTHELP          = $00000080;
  1082.   {$EXTERNALSYM ACMFILTERCHOOSE_STYLEF_CONTEXTHELP}
  1083. function acmFilterChooseA(var pafltrc: TAcmFilterChooseA): MMRESULT; stdcall;
  1084. {$EXTERNALSYM acmFilterChooseA}
  1085. function acmFilterChooseW(var pafltrc: TAcmFilterChooseW): MMRESULT; stdcall;
  1086. {$EXTERNALSYM acmFilterChooseW}
  1087. function acmFilterChoose(var pafltrc: TAcmFilterChoose): MMRESULT; stdcall;
  1088. {$EXTERNALSYM acmFilterChoose}
  1089. //--------------------------------------------------------------------------;
  1090. //
  1091. //  ACM Stream API's
  1092. //
  1093. //--------------------------------------------------------------------------;
  1094. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1095. //
  1096. //  acmStreamOpen()
  1097. //
  1098. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1099. type
  1100.   PAcmStreamHeader = ^TAcmStreamHeader;
  1101.   ACMSTREAMHEADER = packed record
  1102.     cbStruct: DWORD;
  1103.     fdwStatus: DWORD;
  1104.     dwUser: DWORD;
  1105.     pbSrc: PBYTE;
  1106.     cbSrcLength: DWORD;
  1107.     cbSrcLengthUsed: DWORD;
  1108.     dwSrcUser: DWORD;
  1109.     pbDst: PBYTE;
  1110.     cbDstLength: DWORD;
  1111.     cbDstLengthUsed: DWORD;
  1112.     dwDstUser: DWORD;
  1113.     dwReservedDriver: array [0..10 - 1] of DWORD;
  1114.   end;
  1115.   {$EXTERNALSYM tACMSTREAMHEADER}
  1116.   TAcmStreamHeader = ACMSTREAMHEADER;
  1117. //
  1118. //  ACMSTREAMHEADER.fdwStatus
  1119. //
  1120. //  ACMSTREAMHEADER_STATUSF_DONE: done bit for async conversions.
  1121. //
  1122. const
  1123.   ACMSTREAMHEADER_STATUSF_DONE     = $00010000;
  1124.   {$EXTERNALSYM ACMSTREAMHEADER_STATUSF_DONE}
  1125.   ACMSTREAMHEADER_STATUSF_PREPARED = $00020000;
  1126.   {$EXTERNALSYM ACMSTREAMHEADER_STATUSF_PREPARED}
  1127.   ACMSTREAMHEADER_STATUSF_INQUEUE  = $00100000;
  1128.   {$EXTERNALSYM ACMSTREAMHEADER_STATUSF_INQUEUE}
  1129. function acmStreamOpen(var phas: HACMSTREAM; had: HACMDRIVER; var pwfxSrc: TWAVEFORMATEX;
  1130.   var pwfxDst: TWAVEFORMATEX; pwfltr: PWAVEFILTER; dwCallback: DWORD; dwInstance: DWORD;
  1131.   fdwOpen: DWORD): MMRESULT; stdcall;
  1132. {$EXTERNALSYM acmStreamOpen}
  1133. const
  1134.   ACM_STREAMOPENF_QUERY       = $00000001;
  1135.   {$EXTERNALSYM ACM_STREAMOPENF_QUERY}
  1136.   ACM_STREAMOPENF_ASYNC       = $00000002;
  1137.   {$EXTERNALSYM ACM_STREAMOPENF_ASYNC}
  1138.   ACM_STREAMOPENF_NONREALTIME = $00000004;
  1139.   {$EXTERNALSYM ACM_STREAMOPENF_NONREALTIME}
  1140. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1141. //
  1142. //  acmStreamClose()
  1143. //
  1144. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1145. function acmStreamClose(has: HACMSTREAM; fdwClose: DWORD): MMRESULT; stdcall;
  1146. {$EXTERNALSYM acmStreamClose}
  1147. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1148. //
  1149. //  acmStreamSize()
  1150. //
  1151. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1152. function acmStreamSize(has: HACMSTREAM; cbInput: DWORD; var pdwOutputBytes: DWORD;
  1153.   fdwSize: DWORD): MMRESULT; stdcall;
  1154. {$EXTERNALSYM acmStreamSize}
  1155. const
  1156.   ACM_STREAMSIZEF_SOURCE      = $00000000;
  1157.   {$EXTERNALSYM ACM_STREAMSIZEF_SOURCE}
  1158.   ACM_STREAMSIZEF_DESTINATION = $00000001;
  1159.   {$EXTERNALSYM ACM_STREAMSIZEF_DESTINATION}
  1160.   ACM_STREAMSIZEF_QUERYMASK   = $0000000F;
  1161.   {$EXTERNALSYM ACM_STREAMSIZEF_QUERYMASK}
  1162. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1163. //
  1164. //  acmStreamReset()
  1165. //
  1166. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1167. function acmStreamReset(has: HACMSTREAM; fdwReset: DWORD): MMRESULT; stdcall;
  1168. {$EXTERNALSYM acmStreamReset}
  1169. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1170. //
  1171. //  acmStreamMessage()
  1172. //
  1173. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1174. function acmStreamMessage(has: HACMSTREAM; uMsg: UINT; var lParam1: LPARAM;
  1175.   var lParam2: LPARAM): MMRESULT; stdcall;
  1176. {$EXTERNALSYM acmStreamMessage}
  1177. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1178. //
  1179. //  acmStreamConvert()
  1180. //
  1181. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1182. function acmStreamConvert(has: HACMSTREAM; var pash: TAcmStreamHeader;
  1183.   fdwConvert: DWORD): MMRESULT; stdcall;
  1184. {$EXTERNALSYM acmStreamConvert}
  1185. const
  1186.   ACM_STREAMCONVERTF_BLOCKALIGN = $00000004;
  1187.   {$EXTERNALSYM ACM_STREAMCONVERTF_BLOCKALIGN}
  1188.   ACM_STREAMCONVERTF_START      = $00000010;
  1189.   {$EXTERNALSYM ACM_STREAMCONVERTF_START}
  1190.   ACM_STREAMCONVERTF_END        = $00000020;
  1191.   {$EXTERNALSYM ACM_STREAMCONVERTF_END}
  1192. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1193. //
  1194. //  acmStreamPrepareHeader()
  1195. //
  1196. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1197. function acmStreamPrepareHeader(has: HACMSTREAM; var pash: TAcmStreamHeader;
  1198.   fdwPrepare: DWORD): MMRESULT; stdcall;
  1199. {$EXTERNALSYM acmStreamPrepareHeader}
  1200. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1201. //
  1202. //  acmStreamUnprepareHeader()
  1203. //
  1204. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  1205. function acmStreamUnprepareHeader(has: HACMSTREAM; var pash: TAcmStreamHeader;
  1206.   fdwUnprepare: DWORD): MMRESULT; stdcall;
  1207. {$EXTERNALSYM acmStreamUnprepareHeader}
  1208. implementation
  1209. const
  1210.   msacm32 = 'msacm32.dll';
  1211. function acmGetVersion;            external msacm32 name 'acmGetVersion';
  1212. function acmMetrics;               external msacm32 name 'acmMetrics';
  1213. function acmDriverEnum;            external msacm32 name 'acmDriverEnum';
  1214. function acmDriverID;              external msacm32 name 'acmDriverID';
  1215. function acmDriverAddA;          external msacm32 name 'acmDriverAddA';
  1216. function acmDriverAddW;          external msacm32 name 'acmDriverAddW';
  1217. function acmDriverAdd;          external msacm32 name 'acmDriverAddA';
  1218. function acmDriverRemove;          external msacm32 name 'acmDriverRemove';
  1219. function acmDriverOpen;            external msacm32 name 'acmDriverOpen';
  1220. function acmDriverClose;           external msacm32 name 'acmDriverClose';
  1221. function acmDriverMessage;         external msacm32 name 'acmDriverMessage';
  1222. function acmDriverPriority;        external msacm32 name 'acmDriverPriority';
  1223. function acmDriverDetailsA;      external msacm32 name 'acmDriverDetailsA';
  1224. function acmDriverDetailsW;      external msacm32 name 'acmDriverDetailsW';
  1225. function acmDriverDetails;      external msacm32 name 'acmDriverDetailsA';
  1226. function acmFormatTagDetailsA;   external msacm32 name 'acmFormatTagDetailsA';
  1227. function acmFormatTagDetailsW;   external msacm32 name 'acmFormatTagDetailsW';
  1228. function acmFormatTagDetails;   external msacm32 name 'acmFormatTagDetailsA';
  1229. function acmFormatDetailsA;      external msacm32 name 'acmFormatDetailsA';
  1230. function acmFormatDetailsW;      external msacm32 name 'acmFormatDetailsW';
  1231. function acmFormatDetails;      external msacm32 name 'acmFormatDetailsA';
  1232. function acmFormatChooseA;       external msacm32 name 'acmFormatChooseA';
  1233. function acmFormatChooseW;       external msacm32 name 'acmFormatChooseW';
  1234. function acmFormatChoose;       external msacm32 name 'acmFormatChooseA';
  1235. function acmFormatEnumA;         external msacm32 name 'acmFormatEnumA';
  1236. function acmFormatEnumW;         external msacm32 name 'acmFormatEnumW';
  1237. function acmFormatEnum;         external msacm32 name 'acmFormatEnumA';
  1238. function acmFormatTagEnumA;      external msacm32 name 'acmFormatTagEnumA';
  1239. function acmFormatTagEnumW;      external msacm32 name 'acmFormatTagEnumW';
  1240. function acmFormatTagEnum;      external msacm32 name 'acmFormatTagEnumA';
  1241. function acmFormatSuggest;         external msacm32 name 'acmFormatSuggest';
  1242. function acmFilterTagDetailsA;   external msacm32 name 'acmFilterTagDetailsA';
  1243. function acmFilterTagDetailsW;   external msacm32 name 'acmFilterTagDetailsW';
  1244. function acmFilterTagDetails;   external msacm32 name 'acmFilterTagDetailsA';
  1245. function acmFilterTagEnumA;      external msacm32 name 'acmFilterTagEnumA';
  1246. function acmFilterTagEnumW;      external msacm32 name 'acmFilterTagEnumW';
  1247. function acmFilterTagEnum;      external msacm32 name 'acmFilterTagEnumA';
  1248. function acmFilterDetailsA;      external msacm32 name 'acmFilterDetailsA';
  1249. function acmFilterDetailsW;      external msacm32 name 'acmFilterDetailsW';
  1250. function acmFilterDetails;      external msacm32 name 'acmFilterDetailsA';
  1251. function acmFilterEnumA;         external msacm32 name 'acmFilterEnumA';
  1252. function acmFilterEnumW;         external msacm32 name 'acmFilterEnumW';
  1253. function acmFilterEnum;         external msacm32 name 'acmFilterEnumA';
  1254. function acmFilterChooseA;       external msacm32 name 'acmFilterChooseA';
  1255. function acmFilterChooseW;       external msacm32 name 'acmFilterChooseW';
  1256. function acmFilterChoose;       external msacm32 name 'acmFilterChooseA';
  1257. function acmStreamOpen;            external msacm32 name 'acmStreamOpen';
  1258. function acmStreamClose;           external msacm32 name 'acmStreamClose';
  1259. function acmStreamSize;            external msacm32 name 'acmStreamSize';
  1260. function acmStreamReset;           external msacm32 name 'acmStreamReset';
  1261. function acmStreamMessage;         external msacm32 name 'acmStreamMessage';
  1262. function acmStreamConvert;         external msacm32 name 'acmStreamConvert';
  1263. function acmStreamPrepareHeader;   external msacm32 name 'acmStreamPrepareHeader';
  1264. function acmStreamUnprepareHeader; external msacm32 name 'acmStreamUnprepareHeader';
  1265. end.