Mmacm.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:46k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. {========================================================================}
  2. {=                (c) 1995-98 SwiftSoft Ronald Dittrich                 =}
  3. {========================================================================}
  4. {=                          All Rights Reserved                         =}
  5. {========================================================================}
  6. {=  D 01099 Dresden             = Fax.: +49 (0)351-8037944              =}
  7. {=  Loewenstr.7a                = info@swiftsoft.de                     =}
  8. {========================================================================}
  9. {=  Actual versions on http://www.swiftsoft.de/mmtools.html             =}
  10. {========================================================================}
  11. {=  This code is for reference purposes only and may not be copied or   =}
  12. {=  distributed in any format electronic or otherwise except one copy   =}
  13. {=  for backup purposes.                                                =}
  14. {=                                                                      =}
  15. {=  No Delphi Component Kit or Component individually or in a collection=}
  16. {=  subclassed or otherwise from the code in this unit, or associated   =}
  17. {=  .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed     =}
  18. {=  without express permission from SwiftSoft.                          =}
  19. {=                                                                      =}
  20. {=  For more licence informations please refer to the associated        =}
  21. {=  HelpFile.                                                           =}
  22. {========================================================================}
  23. {=  $Date: 06.09.98 - 12:42:51 $                                        =}
  24. {========================================================================}
  25. unit MMACM;
  26. {$I COMPILER.INC}
  27. interface
  28. uses
  29. {$IFDEF WIN32}
  30.     Windows,
  31. {$ELSE}
  32.     WinProcs,   
  33.     WinTypes,
  34. {$ENDIF}
  35.     SysUtils,
  36.     MMSystem,
  37.     MMRegs;
  38. const
  39.      acmDLLLoaded: Boolean = False;
  40.      acmDLLHandle: THandle = 0;
  41. const
  42.      DRV_MAPPER_PREFERRED_INPUT_GET  = (DRV_USER + 0);
  43.      DRV_MAPPER_PREFERRED_OUTPUT_GET = (DRV_USER + 2);
  44.      DRVM_MAPPER_STATUS              = ($2000);
  45.      WIDM_MAPPER_STATUS              = (DRVM_MAPPER_STATUS + 0);
  46.      WAVEIN_MAPPER_STATUS_DEVICE     = 0;
  47.      WAVEIN_MAPPER_STATUS_MAPPED     = 1;
  48.      WAVEIN_MAPPER_STATUS_FORMAT     = 2;
  49.      WODM_MAPPER_STATUS              = (DRVM_MAPPER_STATUS + 0);
  50.      WAVEOUT_MAPPER_STATUS_DEVICE    = 0;
  51.      WAVEOUT_MAPPER_STATUS_MAPPED    = 1;
  52.      WAVEOUT_MAPPER_STATUS_FORMAT    = 2;
  53. {========================================================================}
  54. { ACM General API's and Defines                                          }
  55. {========================================================================}
  56. {------------------------------------------------------------------------}
  57. { there are four types of 'handles' used by the ACM. the first three     }
  58. { are unique types that define specific objects:                         }
  59. {                                                                        }
  60. { HACMDRIVERID:                                                          }
  61. { used to _identify_ an ACM driver. this identifier can be used to _open_}
  62. { the driver for querying details, etc about the driver.                 }
  63. {                                                                        }
  64. { HACMDRIVER:                                                            }
  65. { used to manage a driver (codec, filter, etc). this handle is much like }
  66. { a handle to other media drivers--you use it to send messages to the    }
  67. { converter, query for capabilities, etc.                                }
  68. {                                                                        }
  69. { HACMSTREAM:                                                            }
  70. { used to manage a 'stream' (conversion channel) with the ACM. you use a }
  71. { stream handle to convert data from one format/type to another--much    }
  72. { like dealing with a file handle.                                       }
  73. {                                                                        }
  74. { the fourth handle type is a generic type used on ACM functions that    }
  75. { can accept two or more of the above handle types (for example the      }
  76. { acmMetrics and acmDriverID functions).                                 }
  77. {                                                                        }
  78. { HACMOBJ:                                                               }
  79. { used to identify ACM objects. this handle is used on functions that can}
  80. { accept two or more ACM handle types.                                   }
  81. {------------------------------------------------------------------------}
  82. type
  83.     PHACMDRIVERID = ^THACMDRIVERID;
  84.     THACMDRIVERID = THandle;
  85.     PHACMDRIVER   = ^THACMDRIVER;
  86.     THACMDRIVER   = THandle;
  87.     PHACMSTREAM   = ^THACMSTREAM;
  88.     THACMSTREAM   = THandle;
  89.     PHACMOBJ      = ^THACMOBJ;
  90.     THACMOBJ      = THandle;
  91. {-----------------------------------------------------------------------}
  92. { ACM Error Codes                                                       }
  93. {                                                                       }
  94. { Note that these error codes are specific errors that apply to the ACM }
  95. { directly--general errors are defined as MMSYSTEM.                     }
  96. {-----------------------------------------------------------------------}
  97. const
  98.      ACMERR_BASE        = (512);
  99.      ACMERR_NOTPOSSIBLE = (ACMERR_BASE + 0);
  100.      ACMERR_BUSY        = (ACMERR_BASE + 1);
  101.      ACMERR_UNPREPARED  = (ACMERR_BASE + 2);
  102.      ACMERR_CANCELED    = (ACMERR_BASE + 3);
  103. {-----------------------------------------------------------------------}
  104. { ACM Window Messages                                                   }
  105. {                                                                       }
  106. { These window messages are sent by the ACM or ACM drivers to notify    }
  107. { applications of events.                                               }
  108. {                                                                       }
  109. { Note that these window message numbers will also be defined in        }
  110. { MMSYSTEM.                                                             }
  111. {-----------------------------------------------------------------------}
  112. const   { BUGBUG: ev. 16 bit others ? }
  113.      MM_ACM_OPEN  = $03D4;               { conversion callback messages }
  114.      MM_ACM_CLOSE = $03D5;
  115.      MM_ACM_DONE  = $03D6;
  116. {-----------------------------------------------------------------------}
  117. {  function acmGetVersion: Longint;                                     }
  118. {                                                                       }
  119. { the ACM version is a 32 bit number that is broken into three parts as }
  120. {  follows:                                                             }
  121. {                                                                       }
  122. {     bits 24 - 31:   8 bit _major_ version number                      }
  123. {     bits 16 - 23:   8 bit _minor_ version number                      }
  124. {     bits  0 - 15:   16 bit build number                               }
  125. {                                                                       }
  126. {  this is then displayed as follows:                                   }
  127. {                                                                       }
  128. {     bMajor = (BYTE)(dwVersion >> 24)                                  }
  129. {     bMinor = (BYTE)(dwVersion >> 16) &                                }
  130. {     wBuild = LOWORD(dwVersion)                                        }
  131. {                                                                       }
  132. {-----------------------------------------------------------------------}
  133. var
  134.    acmGetVersion: function: DWORD; {$IFDEF WIN32}stdcall;{$ENDIF}
  135. {-----------------------------------------------------------------------}
  136. { acmMetrics                                                            }
  137. {-----------------------------------------------------------------------}
  138. var
  139.    acmMetrics: function(hao: THACMOBJ; uMetric: UINT; pMetric: Pointer): MMRESULT;
  140.                         {$IFDEF WIN32}stdcall;{$ENDIF}
  141. const
  142.      ACM_METRIC_COUNT_DRIVERS          = 1;
  143.      ACM_METRIC_COUNT_CODECS           = 2;
  144.      ACM_METRIC_COUNT_CONVERTERS       = 3;
  145.      ACM_METRIC_COUNT_FILTERS          = 4;
  146.      ACM_METRIC_COUNT_DISABLED         = 5;
  147.      ACM_METRIC_COUNT_HARDWARE         = 6;
  148.      ACM_METRIC_COUNT_LOCAL_DRIVERS    = 20;
  149.      ACM_METRIC_COUNT_LOCAL_CODECS     = 21;
  150.      ACM_METRIC_COUNT_LOCAL_CONVERTERS = 22;
  151.      ACM_METRIC_COUNT_LOCAL_FILTERS    = 23;
  152.      ACM_METRIC_COUNT_LOCAL_DISABLED   = 24;
  153.      ACM_METRIC_HARDWARE_WAVE_INPUT    = 30;
  154.      ACM_METRIC_HARDWARE_WAVE_OUTPUT   = 31;
  155.      ACM_METRIC_MAX_SIZE_FORMAT        = 50;
  156.      ACM_METRIC_MAX_SIZE_FILTER        = 51;
  157.      ACM_METRIC_DRIVER_SUPPORT         = 100;
  158.      ACM_METRIC_DRIVER_PRIORITY        = 101;
  159. {=======================================================================}
  160. { ACM Drivers                                                           }
  161. {=======================================================================}
  162. {=======================================================================}
  163. { acmDriverEnum                                                         }
  164. {=======================================================================}
  165. type
  166.     TACMDRIVERENUMCB = function(hadid: THACMDRIVERID;
  167.                                 dwInstance, fdwSupport: DWORD): Boolean;
  168.                                 {$IFDEF WIN32} stdcall; {$ENDIF}
  169. var
  170.    acmDriverEnum: function(fnCallback: TACMDRIVERENUMCB;
  171.                            dwInstance, fdwEnum: DWORD): MMRESULT;
  172.                            {$IFDEF WIN32} stdcall; {$ENDIF}
  173. const
  174.      ACM_DRIVERENUMF_NOLOCAL  = $40000000;
  175.      ACM_DRIVERENUMF_DISABLED = $80000000;
  176. {-----------------------------------------------------------------------}
  177. { acmDriverID                                                           }
  178. {-----------------------------------------------------------------------}
  179. var
  180.    acmDriverID: function(hao: THACMOBJ; phadid: PHACMDRIVERID;
  181.                          fdwDriverID: DWORD): MMRESULT;
  182.                          {$IFDEF WIN32} stdcall; {$ENDIF}
  183. {-----------------------------------------------------------------------}
  184. { acmDriverAdd                                                          }
  185. {-----------------------------------------------------------------------}
  186. var
  187.    acmDriverAdd: function(phadid: PHACMDRIVERID; hinstModule: THandle;
  188.                           lParam: LPARAM; dwPriority: DWORD; fdwAdd: DWORD): MMRESULT;
  189.                           {$IFDEF WIN32} stdcall; {$ENDIF}
  190. const
  191.      ACM_DRIVERADDF_FUNCTION   = $00000003;  { lParam is a procedure    }
  192.      ACM_DRIVERADDF_NOTIFYHWND = $00000004;  { lParam is notify hwnd    }
  193.      ACM_DRIVERADDF_TYPEMASK   = $00000007;  { driver type mask         }
  194.      ACM_DRIVERADDF_LOCAL      = $00000000;  { is local to current task }
  195.      ACM_DRIVERADDF_GLOBAL     = $00000008;  { is global                }
  196. {-----------------------------------------------------------------------}
  197. { prototype for ACM driver procedures that are installed as _functions_ }
  198. { or _notifations_ instead of as a standalone installable driver.       }
  199. {-----------------------------------------------------------------------}
  200. (*type
  201.     PACMDRIVERPROC = ^TACMDRIVERPROC;
  202.     TACMDRIVERPROC = function(DWORD; THACMDRIVERID; UINT; LPARAM;
  203.                               LPARAM): LRESULT;
  204.                               {$IFDEF WIN32} stdcall; {$ENDIF}
  205. *)
  206. {-----------------------------------------------------------------------}
  207. { acmDriverRemove                                                       }
  208. {-----------------------------------------------------------------------}
  209. var
  210.    acmDriverRemove: function(hadid: THACMDRIVERID; fdwRemove: DWORD): MMRESULT;
  211.                              {$IFDEF WIN32} stdcall; {$ENDIF}
  212. {-----------------------------------------------------------------------}
  213. { acmDriverOpen                                                         }
  214. {-----------------------------------------------------------------------}
  215. var
  216.    acmDriverOpen: function(phad: PHACMDRIVER; hadid: THACMDRIVERID; fdwOpen: DWORD): MMRESULT;
  217.                            {$IFDEF WIN32} stdcall; {$ENDIF}
  218. {-----------------------------------------------------------------------}
  219. { acmDriverClose                                                        }
  220. {-----------------------------------------------------------------------}
  221. var
  222.    acmDriverClose: function(had: THACMDRIVER; fdwClose: DWORD): MMRESULT;
  223.                             {$IFDEF WIN32} stdcall; {$ENDIF}
  224. {-----------------------------------------------------------------------}
  225. { acmDriverMessage                                                      }
  226. {-----------------------------------------------------------------------}
  227. var
  228.    acmDriverMessage: function(had: THACMDRIVER; uMsg: UINT;
  229.                               lParam1, lParam2: LPARAM): LRESULT;
  230.                               {$IFDEF WIN32} stdcall; {$ENDIF}
  231. const
  232.      ACMDM_USER          = (DRV_USER + $0000);
  233.      ACMDM_RESERVED_LOW  = (DRV_USER + $2000);
  234.      ACMDM_RESERVED_HIGH = (DRV_USER + $2FFF);
  235.      ACMDM_BASE          = ACMDM_RESERVED_LOW;
  236.      ACMDM_DRIVER_ABOUT  = (ACMDM_BASE + 11);
  237. {-----------------------------------------------------------------------}
  238. { acmDriverPriority                                                     }
  239. {-----------------------------------------------------------------------}
  240. var
  241.    acmDriverPriority: function(hadid: THACMDRIVERID;
  242.                                dwPriority, fdwPriority: DWORD): MMRESULT;
  243.                                {$IFDEF WIN32} stdcall; {$ENDIF}
  244. const
  245.      ACM_DRIVERPRIORITYF_ENABLE    = $00000001;
  246.      ACM_DRIVERPRIORITYF_DISABLE   = $00000002;
  247.      ACM_DRIVERPRIORITYF_ABLEMASK  = $00000003;
  248.      ACM_DRIVERPRIORITYF_BEGIN     = $00010000;
  249.      ACM_DRIVERPRIORITYF_END       = $00020000;
  250.      ACM_DRIVERPRIORITYF_DEFERMASK = $00030000;
  251. {-----------------------------------------------------------------------}
  252. { acmDriverDetails                                                      }
  253. {-----------------------------------------------------------------------}
  254. {                                                                       }
  255. {  ACMDRIVERDETAILS                                                     }
  256. {                                                                       }
  257. {  the ACMDRIVERDETAILS structure is used to get various capabilities   }
  258. {  from an ACM driver (codec, converter, filter).                       }
  259. {-----------------------------------------------------------------------}
  260. const
  261.      ACMDRIVERDETAILS_SHORTNAME_CHARS = 32;
  262.      ACMDRIVERDETAILS_LONGNAME_CHARS  = 128;
  263.      ACMDRIVERDETAILS_COPYRIGHT_CHARS = 80;
  264.      ACMDRIVERDETAILS_LICENSING_CHARS = 128;
  265.      ACMDRIVERDETAILS_FEATURES_CHARS  = 512;
  266. type
  267.     PACMDRIVERDETAILS = ^TACMDRIVERDETAILS;
  268.     TACMDRIVERDETAILS = record
  269.         cbStruct   : DWORD;        { number of valid bytes in structure }
  270.         fccType    : FOURCC;       { compressor type 'audc'             }
  271.         fccComp    : FOURCC;       { sub-type (not used; reserved)      }
  272.         wMid       : WORD;         { manufacturer id                    }
  273.         wPid       : WORD;         { product id                         }
  274.         vdwACM     : DWORD;        { version of the ACM *compiled* for  }
  275.         vdwDriver  : DWORD;        { version of the driver              }
  276.         fdwSupport : DWORD;        { misc. support flags                }
  277.         cFormatTags: DWORD;        { total unique format tags supported }
  278.         cFilterTags: DWORD;        { total unique filter tags supported }
  279.         hicon      : HICON;        { handle to custom icon              }
  280.         szShortName: array[0..ACMDRIVERDETAILS_SHORTNAME_CHARS-1]of Char;
  281.         szLongName : array[0..ACMDRIVERDETAILS_LONGNAME_CHARS-1] of Char;
  282.         szCopyright: array[0..ACMDRIVERDETAILS_COPYRIGHT_CHARS-1]of Char;
  283.         szLicensing: array[0..ACMDRIVERDETAILS_LICENSING_CHARS-1]of Char;
  284.         szFeatures : array[0..ACMDRIVERDETAILS_FEATURES_CHARS-1] of Char;
  285.     end;
  286. {-----------------------------------------------------------------------}
  287. {                                                                       }
  288. {  ACMDRIVERDETAILS.fccType                                             }
  289. {                                                                       }
  290. {  ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC: the FOURCC used in the fccType  }
  291. {  field of the ACMDRIVERDETAILS structure to specify that this is an   }
  292. {  ACM codec designed for audio.                                        }
  293. {                                                                       }
  294. {                                                                       }
  295. {  ACMDRIVERDETAILS.fccComp                                             }
  296. {                                                                       }
  297. {  ACMDRIVERDETAILS_FCCCOMP_UNDEFINED: the FOURCC used in the fccComp   }
  298. {  field of the ACMDRIVERDETAILS structure. this is currently an unused }
  299. {  field.                                                               }
  300. {-----------------------------------------------------------------------}
  301. const
  302.      ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC = $63647561; {'audc'}
  303.      ACMDRIVERDETAILS_FCCCOMP_UNDEFINED  = $0;
  304. {  the following flags are used to specify the type of conversion(s) that     }
  305. {  the converter/codec/filter supports. these are placed in the fdwSupport    }
  306. {  field of the ACMDRIVERDETAILS structure. note that a converter can         }
  307. {  support one or more of these flags in any combination.                     }
  308. {                                                                             }
  309. {  ACMDRIVERDETAILS_SUPPORTF_CODEC: this flag is set if the driver supports   }
  310. {  conversions from one format tag to another format tag. for example, if a   }
  311. {  converter compresses WAVE_FORMAT_PCM to WAVE_FORMAT_ADPCM, then this bit   }
  312. {  should be set.                                                             }
  313. {                                                                             }
  314. {  ACMDRIVERDETAILS_SUPPORTF_CONVERTER: this flags is set if the driver       }
  315. {  supports conversions on the same format tag. as an example, the PCM        }
  316. {  converter that is built into the ACM sets this bit (and only this bit)     }
  317. {  because it converts only PCM formats (bits, sample rate).                  }
  318. {                                                                             }
  319. {  ACMDRIVERDETAILS_SUPPORTF_FILTER: this flag is set if the driver supports  }
  320. {  transformations on a single format. for example, a converter that changed  }
  321. {  the 'volume' of PCM data would set this bit. 'echo' and 'reverb' are       }
  322. {  also filter types.                                                         }
  323. {                                                                             }
  324. {  ACMDRIVERDETAILS_SUPPORTF_HARDWARE: this flag is set if the driver supports}
  325. {  hardware input and/or output through a waveform device.                    }
  326. {                                                                             }
  327. {  ACMDRIVERDETAILS_SUPPORTF_ASYNC: this flag is set if the driver supports   }
  328. {  async conversions.                                                         }
  329. {                                                                             }
  330. {  ACMDRIVERDETAILS_SUPPORTF_LOCAL: this flag is set _by the ACM_ if a        }
  331. {  driver has been installed local to the current task. this flag is also     }
  332. {  set in the fdwSupport argument to the enumeration callback function        }
  333. {  for drivers.                                                               }
  334. {                                                                             }
  335. {  ACMDRIVERDETAILS_SUPPORTF_DISABLED: this flag is set _by the ACM_ if a     }
  336. {  driver has been disabled. this flag is also passed set in the fdwSupport   }
  337. {  argument to the enumeration callback function for drivers.                 }
  338. {                                                                             }
  339. {-----------------------------------------------------------------------------}
  340. const
  341.      ACMDRIVERDETAILS_SUPPORTF_CODEC     = $00000001;
  342.      ACMDRIVERDETAILS_SUPPORTF_CONVERTER = $00000002;
  343.      ACMDRIVERDETAILS_SUPPORTF_FILTER    = $00000004;
  344.      ACMDRIVERDETAILS_SUPPORTF_HARDWARE  = $00000008;
  345.      ACMDRIVERDETAILS_SUPPORTF_ASYNC     = $00000010;
  346.      ACMDRIVERDETAILS_SUPPORTF_LOCAL     = $40000000;
  347.      ACMDRIVERDETAILS_SUPPORTF_DISABLED  = $80000000;
  348. var
  349.    acmDriverDetails: function(hadid: THACMDRIVERID; padd: PACMDRIVERDETAILS;
  350.                               fdwDetails: DWORD): MMRESULT;
  351.                               {$IFDEF WIN32} stdcall; {$ENDIF}
  352. {=======================================================================}
  353. { ACM Format Tags                                                       }
  354. {=======================================================================}
  355. {-----------------------------------------------------------------------}
  356. { acmFormatTagDetails                                                   }
  357. {-----------------------------------------------------------------------}
  358. const
  359.      ACMFORMATTAGDETAILS_FORMATTAG_CHARS = 48;
  360. type
  361.     PACMFORMATTAGDETAILS = ^TACMFORMATTAGDETAILS;
  362.     TACMFORMATTAGDETAILS = record
  363.        cbStruct        : DWORD;
  364.        dwFormatTagIndex: DWORD;
  365.        dwFormatTag     : DWORD;
  366.        cbFormatSize    : DWORD;
  367.        fdwSupport      : DWORD;
  368.        cStandardFormats: DWORD;
  369.        szFormatTag: array[0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS-1] of Char;
  370.     end;
  371. var
  372.    acmFormatTagDetails: function(had: THACMDRIVER; paftd: PACMFORMATTAGDETAILS;
  373.                                  fdwDetails: DWORD): MMRESULT;
  374.                                  {$IFDEF WIN32}stdcall; {$ENDIF}
  375. const
  376.      ACM_FORMATTAGDETAILSF_INDEX       = $00000000;
  377.      ACM_FORMATTAGDETAILSF_FORMATTAG   = $00000001;
  378.      ACM_FORMATTAGDETAILSF_LARGESTSIZE = $00000002;
  379.      ACM_FORMATTAGDETAILSF_QUERYMASK   = $0000000F;
  380. {-----------------------------------------------------------------------}
  381. { acmFormatTagEnum                                                      }
  382. {-----------------------------------------------------------------------}
  383. type
  384.     TACMFORMATTAGENUMCB = function(hadid: THACMDRIVERID;
  385.                                    paftd: PACMFORMATTAGDETAILS;
  386.                                    dwInstance, fdwSupport: DWORD): Boolean; 
  387.                                    {$IFDEF WIN32}stdcall;{$ENDIF}
  388. var
  389.    acmFormatTagEnum: function(had: THACMDRIVER; paftd: PACMFORMATTAGDETAILS;
  390.                               fnCallBack: TACMFORMATTAGENUMCB;
  391.                               dwInstance, fdwEnum: DWORD): MMRESULT;
  392.                               {$IFDEF WIN32}stdcall;{$ENDIF}
  393. {=======================================================================}
  394. { ACM Formats                                                           }
  395. {=======================================================================}
  396. {-----------------------------------------------------------------------}
  397. { acmFormatDetails                                                      }
  398. {-----------------------------------------------------------------------}
  399. const
  400.      ACMFORMATDETAILS_FORMAT_CHARS = 128;
  401. type
  402.     PACMFORMATDETAILS = ^TACMFORMATDETAILS;
  403.     TACMFORMATDETAILS = record
  404.         cbStruct     : DWORD;
  405.         dwFormatIndex: DWORD;
  406.         dwFormatTag  : DWORD;
  407.         fdwSupport   : DWORD;
  408.         pwfx         : PWAVEFORMATEX;
  409.         cbwfx        : DWORD;
  410.         szFormat: array[0..ACMFORMATDETAILS_FORMAT_CHARS-1] of Char;
  411.     end;
  412. var
  413.    acmFormatDetails: function(had: THACMDRIVER; pafd: PACMFORMATDETAILS;
  414.                               fdwDetails: DWORD): MMRESULT;
  415.                               {$IFDEF WIN32} stdcall; {$ENDIF}
  416. const
  417.      ACM_FORMATDETAILSF_INDEX     = $00000000;
  418.      ACM_FORMATDETAILSF_FORMAT    = $00000001;
  419.      ACM_FORMATDETAILSF_QUERYMASK = $0000000F;
  420. {-----------------------------------------------------------------------}
  421. { acmFormatEnum                                                         }
  422. {-----------------------------------------------------------------------}
  423. type
  424.     TACMFORMATENUMCB = function(hadid: THACMDRIVERID; pafd: PACMFORMATDETAILS;
  425.                                 dwInstance, fdwSupport: DWORD): Boolean; 
  426.                                 {$IFDEF WIN32}stdcall;{$ENDIF}
  427. var
  428.    acmFormatEnum: function(had: THACMDRIVER; pafd: PACMFORMATDETAILS;
  429.                            fnCallBack: TACMFORMATENUMCB;
  430.                            dwInstance, fdwEnum: DWORD): MMRESULT;
  431.                            {$IFDEF WIN32}stdcall;{$ENDIF}
  432. const
  433.      ACM_FORMATENUMF_WFORMATTAG     = $00010000;
  434.      ACM_FORMATENUMF_NCHANNELS      = $00020000;
  435.      ACM_FORMATENUMF_NSAMPLESPERSEC = $00040000;
  436.      ACM_FORMATENUMF_WBITSPERSAMPLE = $00080000;
  437.      ACM_FORMATENUMF_CONVERT        = $00100000;
  438.      ACM_FORMATENUMF_SUGGEST        = $00200000;
  439.      ACM_FORMATENUMF_HARDWARE       = $00400000;
  440.      ACM_FORMATENUMF_INPUT          = $00800000;
  441.      ACM_FORMATENUMF_OUTPUT         = $01000000;
  442. {-----------------------------------------------------------------------}
  443. { acmFormatSuggest                                                      }
  444. {-----------------------------------------------------------------------}
  445. var
  446.    acmFormatSuggest: function(had: THACMDRIVER; pwfxSrc, pwfxDst: PWAVEFORMATEX;
  447.                               cbwfxDst, fdwSuggest: DWORD): MMRESULT;
  448.                               {$IFDEF WIN32}stdcall;{$ENDIF}
  449. const
  450.      ACM_FORMATSUGGESTF_WFORMATTAG     = $00010000;
  451.      ACM_FORMATSUGGESTF_NCHANNELS      = $00020000;
  452.      ACM_FORMATSUGGESTF_NSAMPLESPERSEC = $00040000;
  453.      ACM_FORMATSUGGESTF_WBITSPERSAMPLE = $00080000;
  454.      ACM_FORMATSUGGESTF_TYPEMASK       = $00FF0000;
  455. {-----------------------------------------------------------------------}
  456. { acmFormatChoose                                                       }
  457. {-----------------------------------------------------------------------}
  458. const
  459.      ACMHELPMSGSTRING       = 'acmchoose_help';
  460.      ACMHELPMSGCONTEXTMENU  = 'acmchoose_contextmenu';
  461.      ACMHELPMSGCONTEXTHELP  = 'acmchoose_contexthelp';
  462. { MM_ACM_FORMATCHOOSE is sent to hook callbacks by the Format Chooser   }
  463. {  Dialog...                                                            }
  464.      MM_ACM_FORMATCHOOSE           = ($8000);
  465.      FORMATCHOOSE_MESSAGE          = 0;
  466.      FORMATCHOOSE_FORMATTAG_VERIFY = (FORMATCHOOSE_MESSAGE+0);
  467.      FORMATCHOOSE_FORMAT_VERIFY    = (FORMATCHOOSE_MESSAGE+1);
  468.      FORMATCHOOSE_CUSTOM_VERIFY    = (FORMATCHOOSE_MESSAGE+2);
  469. type
  470.     TACMFORMATCHOOSEHOOKPROC = function(hwnd: HWND; uMsg: UINT;
  471.                                         wParam: WPARAM; lParam: LPARAM): UINT;
  472.                                         {$IFDEF WIN32}stdcall;{$ENDIF}
  473.     PACMFORMATCHOOSE = ^TACMFORMATCHOOSE;
  474.     TACMFORMATCHOOSE = record
  475.         cbStruct       : DWORD;           { sizeof(ACMFORMATCHOOSE)      }
  476.         fdwStyle       : DWORD;           { chooser style flags          }
  477.         hwndOwner      : HWND;            { caller's window handle       }
  478.         pwfx           : PWAVEFORMATEX;   { ptr to wfx buf to receive choice }
  479.         cbwfx          : DWORD;           { size of mem buf for pwfx     }
  480.         pszTitle       : PCHAR;           { dialog box title bar         }
  481.         szFormatTag    : array[0..ACMFORMATTAGDETAILS_FORMATTAG_CHARS-1] of Char;
  482.         szFormat       : array[0..ACMFORMATDETAILS_FORMAT_CHARS-1] of Char;
  483.         pszName        : PCHAR;            { custom name selection       }
  484.         cchName        : DWORD;            { size in chars of mem buf for pszName }
  485.         fdwEnum        : DWORD;            { format enumeration restrictions }
  486.         pwfxEnum       : PWAVEFORMATEX;    { format describing restrictions }
  487.         hInstance      : THandle;          { app instance containing dlg template }
  488.         pszTemplateName: PChar;            { custom template name           }
  489.         lCustData      : LPARAM;           { data passed to hook fn.        }
  490.         pfnHook        : TACMFORMATCHOOSEHOOKPROC;{ ptr to hook function }
  491.     end;
  492. {-----------------------------------------------------------------------}
  493. { ACMFORMATCHOOSE.fdwStyle                                              }
  494. {-----------------------------------------------------------------------}
  495. const
  496.      ACMFORMATCHOOSE_STYLEF_SHOWHELP             = $00000004;
  497.      ACMFORMATCHOOSE_STYLEF_ENABLEHOOK           = $00000008;
  498.      ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE       = $00000010;
  499.      ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE = $00000020;
  500.      ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT      = $00000040;
  501.      ACMFORMATCHOOSE_STYLEF_CONTEXTHELP          = $00000080;
  502. var
  503.    acmFormatChoose: function(pafmtc: PACMFORMATCHOOSE): MMRESULT;
  504.                              {$IFDEF WIN32}stdcall;{$ENDIF}
  505. {=======================================================================}
  506. { ACM Filter Tags                                                       }
  507. {=======================================================================}
  508. {-----------------------------------------------------------------------}
  509. { acmFilterTagDetails                                                   }
  510. {-----------------------------------------------------------------------}
  511. const
  512.      ACMFILTERTAGDETAILS_FILTERTAG_CHARS = 48;
  513. type
  514.     PACMFILTERTAGDETAILS = ^TACMFILTERTAGDETAILS;
  515.     TACMFILTERTAGDETAILS = record
  516.         cbStruct        : DWORD;
  517.         dwFilterTagIndex: DWORD;
  518.         dwFilterTag     : DWORD;
  519.         cbFilterSize    : DWORD;
  520.         fdwSupport      : DWORD;
  521.         cStandardFilters: DWORD;
  522.         szFilterTag: array[0..ACMFILTERTAGDETAILS_FILTERTAG_CHARS-1] of Char;
  523.     end;
  524. var
  525.    acmFilterTagDetails: function(had: THACMDRIVER; paftd: PACMFILTERTAGDETAILS;
  526.                                  fdwDetails: DWORD): MMRESULT;
  527.                                  {$IFDEF WIN32}stdcall;{$ENDIF}
  528. const
  529.      ACM_FILTERTAGDETAILSF_INDEX       = $00000000;
  530.      ACM_FILTERTAGDETAILSF_FILTERTAG   = $00000001;
  531.      ACM_FILTERTAGDETAILSF_LARGESTSIZE = $00000002;
  532.      ACM_FILTERTAGDETAILSF_QUERYMASK   = $0000000F;
  533. {-----------------------------------------------------------------------}
  534. { acmFilterTagEnum                                                      }
  535. {-----------------------------------------------------------------------}
  536. type
  537.     TACMFILTERTAGENUMCB = function(hadid: THACMDRIVERID;
  538.                                    paftd: PACMFILTERTAGDETAILS;
  539.                                    dwInstance, fdwSupport: DWORD): Boolean; 
  540.                                    {$IFDEF WIN32}stdcall;{$ENDIF}
  541. var
  542.    acmFilterTagEnum: function(had: THACMDRIVER;paftd: PACMFILTERTAGDETAILS;
  543.                               fnCallBack: TACMFILTERTAGENUMCB;
  544.                               dwInstance, fdwEnum: DWORD): MMRESULT;
  545.                               {$IFDEF WIN32}stdcall;{$ENDIF}
  546. {=======================================================================}
  547. { ACM Filters                                                           }
  548. {=======================================================================}
  549. {-----------------------------------------------------------------------}
  550. { acmFilterDetails                                                      }
  551. {-----------------------------------------------------------------------}
  552. const
  553.      ACMFILTERDETAILS_FILTER_CHARS = 128;
  554. type
  555.     PACMFILTERDETAILS = ^TACMFILTERDETAILS;
  556.     TACMFILTERDETAILS = record
  557.         cbStruct     : DWORD;
  558.         dwFilterIndex: DWORD;
  559.         dwFilterTag  : DWORD;
  560.         fdwSupport   : DWORD;
  561.         pwfltr       : PWAVEFILTER;
  562.         cbwfltr      : DWORD;
  563.         szFilter: array[0..ACMFILTERDETAILS_FILTER_CHARS-1] of char;
  564.     end;
  565. var
  566.    acmFilterDetails: function(had: THACMDRIVER;
  567.                               pafd: PACMFILTERDETAILS;
  568.                               fdwDetails: DWORD): MMRESULT;
  569.                               {$IFDEF WIN32}stdcall;{$ENDIF}
  570. const
  571.      ACM_FILTERDETAILSF_INDEX     = $00000000;
  572.      ACM_FILTERDETAILSF_FILTER    = $00000001;
  573.      ACM_FILTERDETAILSF_QUERYMASK = $0000000F;
  574. {-----------------------------------------------------------------------}
  575. { acmFilterEnum                                                         }
  576. {-----------------------------------------------------------------------}
  577. type
  578.     TACMFILTERENUMCB = function(hadid: THACMDRIVERID;
  579.                                 pafd: PACMFILTERDETAILS;
  580.                                 dwInstance, fdwSupport: DWORD): Boolean;
  581.                                 {$IFDEF WIN32}stdcall;{$ENDIF}
  582. var
  583.    acmFilterEnum: function(had: THACMDRIVER; pafd: PACMFILTERDETAILS;
  584.                            fnCallBack: TACMFILTERENUMCB;
  585.                            dwInstance, fdwEnum: DWORD): MMRESULT;
  586.                            {$IFDEF WIN32}stdcall;{$ENDIF}
  587. const
  588.      ACM_FILTERENUMF_DWFILTERTAG = $00010000;
  589. {-----------------------------------------------------------------------}
  590. { acmFilterChoose                                                       }
  591. {-----------------------------------------------------------------------}
  592. { MM_ACM_FILTERCHOOSE is sent to hook callbacks by the Filter Chooser   }
  593. { Dialog...                                                             }
  594. const
  595.      MM_ACM_FILTERCHOOSE           = ($8000);
  596.      FILTERCHOOSE_MESSAGE          = 0;
  597.      FILTERCHOOSE_FILTERTAG_VERIFY = (FILTERCHOOSE_MESSAGE+0);
  598.      FILTERCHOOSE_FILTER_VERIFY    = (FILTERCHOOSE_MESSAGE+1);
  599.      FILTERCHOOSE_CUSTOM_VERIFY    = (FILTERCHOOSE_MESSAGE+2);
  600. type
  601.     TACMFILTERCHOOSEHOOKPROC = function(hwnd: HWND; uMsg: UINT;
  602.                                         wParam: WPARAM; lParam: LPARAM): UINT;
  603.                                         {$IFDEF WIN32}stdcall;{$ENDIF}
  604.     PACMFILTERCHOOSE = ^TACMFILTERCHOOSE;
  605.     TACMFILTERCHOOSE = record
  606.         cbStruct   : DWORD;        { sizeof(ACMFILTERCHOOSE)             }
  607.         fdwStyle   : DWORD;        { chooser style flags                 }
  608.         hwndOwner  : HWND;         { caller's window handle              }
  609.         pwfltr     : PWAVEFILTER;  { ptr to wfltr buf to receive choice  }
  610.         cbwfltr    : DWORD;        { size of mem buf for pwfltr          }
  611.         pszTitle   : PChar;
  612.         szFilterTag: array[0..ACMFILTERTAGDETAILS_FILTERTAG_CHARS-1] of Char;
  613.         szFilter   : array[0..ACMFILTERDETAILS_FILTER_CHARS-1] of Char;
  614.         pszName    : PChar;        { custom name selection               }
  615.         cchName    : DWORD;        { size in chars of mem buf for pszName}
  616.         fdwEnum    : DWORD;        { filter enumeration restrictions     }
  617.         pwfltrEnum : PWAVEFILTER;  { filter describing restrictions      }
  618.         hInstance  : THandle;      { app instance containing dlg template}
  619.         pszTemplateName: PChar;    { custom template name                }
  620.         lCustData  : LPARAM;       { data passed to hook fn.             }
  621.         pfnHook    : TACMFILTERCHOOSEHOOKPROC; { ptr to hook function    }
  622.     end;
  623. {-----------------------------------------------------------------------}
  624. { ACMFILTERCHOOSE.fdwStyle                                              }
  625. {-----------------------------------------------------------------------}
  626. const
  627.      ACMFILTERCHOOSE_STYLEF_SHOWHELP             = $00000004;
  628.      ACMFILTERCHOOSE_STYLEF_ENABLEHOOK           = $00000008;
  629.      ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE       = $00000010;
  630.      ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE = $00000020;
  631.      ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT   = $00000040;
  632.      ACMFILTERCHOOSE_STYLEF_CONTEXTHELP          = $00000080;
  633. var
  634.    acmFilterChoose: function(pafltrc: PACMFILTERCHOOSE): MMRESULT;
  635.                              {$IFDEF WIN32}stdcall;{$ENDIF}
  636. {=======================================================================}
  637. { ACM Stream API's                                                      }
  638. {=======================================================================}
  639. {-----------------------------------------------------------------------}
  640. { acmStreamOpen                                                         }
  641. {-----------------------------------------------------------------------}
  642. type
  643.     PACMSTREAMHEADER = ^TACMSTREAMHEADER;
  644.     TACMSTREAMHEADER = record
  645.         cbStruct       : DWORD;    { sizeof(ACMSTREAMHEADER)    }
  646.         fdwStatus      : DWORD;    { ACMSTREAMHEADER_STATUSF_*  }
  647.         dwUser         : DWORD;    { user instance data for hdr }
  648.         pbSrc          : PChar;
  649.         cbSrcLength    : DWORD;
  650.         cbSrcLengthUsed: DWORD;
  651.         dwSrcUser      : DWORD;    { user instance data for src }
  652.         pbDst          : PChar;
  653.         cbDstLength    : DWORD;
  654.         cbDstLengthUsed: DWORD;
  655.         dwDstUser      : DWORD;    { user instance data for dst }
  656.         dwReservedDriver: array[0..9] of Longint;{ driver reserved work space }
  657.     end;
  658. {-----------------------------------------------------------------------}
  659. { ACMSTREAMHEADER.fdwStatus                                             }
  660. {-----------------------------------------------------------------------}
  661. { ACMSTREAMHEADER_STATUSF_DONE: done bit for async conversions.         }
  662. {-----------------------------------------------------------------------}
  663. const
  664.      ACMSTREAMHEADER_STATUSF_DONE     = $00010000;
  665.      ACMSTREAMHEADER_STATUSF_PREPARED = $00020000;
  666.      ACMSTREAMHEADER_STATUSF_INQUEUE  = $00100000;
  667. var
  668.    acmStreamOpen: function(phas: PHACMSTREAM;     { pointer to stream handle        }
  669.                            had:  THACMDRIVER;     { optional driver handle          }
  670.                            pwfxSrc: PWAVEFORMATEX;{ source format to convert        }
  671.                            pwfxDst: PWAVEFORMATEX;{ required destination format     }
  672.                            pwfltr: PWAVEFILTER;   { optional filter                 }
  673.                            dwCallback: DWORD;     { callback                        }
  674.                            dwInstance: DWORD;     { callback instance data          }
  675.                            fdwOpen: DWORD         { ACM_STREAMOPENF_* and CALLBACK_*}
  676.                            ): MMRESULT;
  677.                            {$IFDEF WIN32}stdcall;{$ENDIF}
  678. const
  679.      ACM_STREAMOPENF_QUERY       = $00000001;
  680.      ACM_STREAMOPENF_ASYNC       = $00000002;
  681.      ACM_STREAMOPENF_NONREALTIME = $00000004;
  682. {-----------------------------------------------------------------------}
  683. { acmStreamClose                                                        }
  684. {-----------------------------------------------------------------------}
  685. var
  686.    acmStreamClose: function(has: THACMSTREAM; fdwClose: DWORD): MMRESULT;
  687.                             {$IFDEF WIN32}stdcall;{$ENDIF}
  688. {-----------------------------------------------------------------------}
  689. { acmStreamSize                                                         }
  690. {-----------------------------------------------------------------------}
  691. var
  692.    acmStreamSize: function(has: THACMSTREAM; cbInput: DWORD;
  693.                            var dwOutputBytes: Longint; fdwSize: DWORD): MMRESULT;
  694.                            {$IFDEF WIN32}stdcall;{$ENDIF}
  695. const
  696.      ACM_STREAMSIZEF_SOURCE      = $00000000;
  697.      ACM_STREAMSIZEF_DESTINATION = $00000001;
  698.      ACM_STREAMSIZEF_QUERYMASK   = $0000000F;
  699. {-----------------------------------------------------------------------}
  700. { acmStreamReset                                                        }
  701. {-----------------------------------------------------------------------}
  702. var
  703.    acmStreamReset: function(has: THACMSTREAM; fdwReset: DWORD): MMRESULT;
  704.                             {$IFDEF WIN32}stdcall;{$ENDIF}
  705. {-----------------------------------------------------------------------}
  706. { acmStreamMessage                                                      }
  707. {-----------------------------------------------------------------------}
  708. var
  709.    acmStreamMessage: function(has: THACMSTREAM; uMsg: UINT;
  710.                               lParam1, lParam2: LPARAM): MMRESULT;
  711.                               {$IFDEF WIN32}stdcall;{$ENDIF}
  712. {-----------------------------------------------------------------------}
  713. { acmStreamConvert                                                      }
  714. {-----------------------------------------------------------------------}
  715. var
  716.    acmStreamConvert: function(has: THACMSTREAM; pash: PACMSTREAMHEADER;
  717.                               fdwConvert: DWORD): MMRESULT;
  718.                               {$IFDEF WIN32}stdcall;{$ENDIF}
  719. const
  720.      ACM_STREAMCONVERTF_BLOCKALIGN = $00000004;
  721.      ACM_STREAMCONVERTF_START      = $00000010;
  722.      ACM_STREAMCONVERTF_END        = $00000020;
  723. {-----------------------------------------------------------------------}
  724. { acmStreamPrepareHeader                                                }
  725. {-----------------------------------------------------------------------}
  726. var
  727.    acmStreamPrepareHeader: function(has: THACMSTREAM; pash: PACMSTREAMHEADER;
  728.                                     fdwPrepare: DWORD): MMRESULT;
  729.                                     {$IFDEF WIN32}stdcall;{$ENDIF}
  730. {-----------------------------------------------------------------------}
  731. { acmStreamUnprepareHeader                                              }
  732. {-----------------------------------------------------------------------}
  733. var
  734.    acmStreamUnprepareHeader: function(has: THACMSTREAM; pash: PACMSTREAMHEADER;
  735.                                       fdwUnprepare: DWORD): MMRESULT;
  736.                                       {$IFDEF WIN32}stdcall;{$ENDIF}
  737. implementation
  738. var
  739.    ErrorMode: Cardinal;
  740. procedure NewExitProc; Far;
  741. begin
  742.      if ACMDLLHandle >= HINSTANCE_ERROR then FreeLibrary(ACMDLLHandle);
  743. end;
  744. Initialization
  745.      ErrorMode := SetErrorMode(SEM_NoOpenFileErrorBox);
  746.      {$IFDEF WIN32}
  747.      acmDLLHandle := LoadLibrary('MSACM32.DLL');
  748.      {$ELSE}
  749.      acmDLLHandle := LoadLibrary('MSACM.DLL');
  750.      {$ENDIF}
  751.      SetErrorMode(ErrorMode);
  752.      if abs(acmDLLHandle) >= HINSTANCE_ERROR then
  753.      begin
  754.         @acmGetVersion := GetProcAddress(acmDLLHandle,'acmGetVersion');
  755.         if (@acmGetVersion = nil) then
  756.         begin
  757.            FreeLibrary(acmDLLHandle);
  758.            acmDLLHandle := 0;
  759.            exit;
  760.         end;
  761.         acmDLLLoaded := True;
  762.         {$IFNDEF WIN32}
  763.         AddExitProc(NewExitProc);
  764.         {$ENDIF}
  765.         { if the version of the ACM is *NOT* V2.00 or greater, then     }
  766.         { all other API's are unavailable--so don't waste time trying   }
  767.         { to link to them.                                              }
  768.         if HiWord(acmGetVersion) < $0200 then exit;
  769.         { yipee! the ACM V2.00 or greater appears to be installed and   }
  770.         { happy with us--so link to the rest of the nifty cool API's.   }
  771.         @acmMetrics         := GetProcAddress(acmDLLHandle,'acmMetrics');
  772.         @acmDriverEnum      := GetProcAddress(acmDLLHandle,'acmDriverEnum');
  773.         {$IFDEF WIN32}
  774.         @acmDriverDetails   := GetProcAddress(acmDLLHandle,'acmDriverDetailsA');
  775.         @acmDriverAdd       := GetProcAddress(acmDLLHandle,'acmDriverAddA');
  776.         {$ELSE}
  777.         @acmDriverDetails   := GetProcAddress(acmDLLHandle,'acmDriverDetails');
  778.         @acmDriverAdd       := GetProcAddress(acmDLLHandle,'acmDriverAdd');
  779.         {$ENDIF}
  780.         @acmDriverRemove    := GetProcAddress(acmDLLHandle,'acmDriverRemove');
  781.         @acmDriverOpen      := GetProcAddress(acmDLLHandle,'acmDriverOpen');
  782.         @acmDriverClose     := GetProcAddress(acmDLLHandle,'acmDriverClose');
  783.         @acmDriverMessage   := GetProcAddress(acmDLLHandle,'acmDriverMessage');
  784.         @acmDriverID        := GetProcAddress(acmDLLHandle,'acmDriverID');
  785.         @acmDriverPriority  := GetProcAddress(acmDLLHandle,'acmDriverPriority');
  786.         {$IFDEF WIN32}
  787.         @acmFormatTagDetails:= GetProcAddress(acmDLLHandle,'acmFormatTagDetailsA');
  788.         @acmFormatTagEnum   := GetProcAddress(acmDLLHandle,'acmFormatTagEnumA');
  789.         @acmFormatChoose    := GetProcAddress(acmDLLHandle,'acmFormatChooseA');
  790.         @acmFormatDetails   := GetProcAddress(acmDLLHandle,'acmFormatDetailsA');
  791.         @acmFormatEnum      := GetProcAddress(acmDLLHandle,'acmFormatEnumA');
  792.         {$ELSE}
  793.         @acmFormatTagDetails:= GetProcAddress(acmDLLHandle,'acmFormatTagDetails');
  794.         @acmFormatTagEnum   := GetProcAddress(acmDLLHandle,'acmFormatTagEnum');
  795.         @acmFormatChoose    := GetProcAddress(acmDLLHandle,'acmFormatChoose');
  796.         @acmFormatDetails   := GetProcAddress(acmDLLHandle,'acmFormatDetails');
  797.         @acmFormatEnum      := GetProcAddress(acmDLLHandle,'acmFormatEnum');
  798.         {$ENDIF}
  799.         @acmFormatSuggest   := GetProcAddress(acmDLLHandle,'acmFormatSuggest');
  800.         {$IFDEF WIN32}
  801.         @acmFilterTagDetails:= GetProcAddress(acmDLLHandle,'acmFilterTagDetailsA');
  802.         @acmFilterTagEnum   := GetProcAddress(acmDLLHandle,'acmFilterTagEnumA');
  803.         @acmFilterChoose    := GetProcAddress(acmDLLHandle,'acmFilterChooseA');
  804.         @acmFilterDetails   := GetProcAddress(acmDLLHandle,'acmFilterDetailsA');
  805.         @acmFilterEnum      := GetProcAddress(acmDLLHandle,'acmFilterEnumA');
  806.         {$ELSE}
  807.         @acmFilterTagDetails:= GetProcAddress(acmDLLHandle,'acmFilterTagDetails');
  808.         @acmFilterTagEnum   := GetProcAddress(acmDLLHandle,'acmFilterTagEnum');
  809.         @acmFilterChoose    := GetProcAddress(acmDLLHandle,'acmFilterChoose');
  810.         @acmFilterDetails   := GetProcAddress(acmDLLHandle,'acmFilterDetails');
  811.         @acmFilterEnum      := GetProcAddress(acmDLLHandle,'acmFilterEnum');
  812.         {$ENDIF}
  813.         @acmStreamOpen      := GetProcAddress(acmDLLHandle,'acmStreamOpen');
  814.         @acmStreamClose     := GetProcAddress(acmDLLHandle,'acmStreamClose');
  815.         @acmStreamSize      := GetProcAddress(acmDLLHandle,'acmStreamSize');
  816.         @acmStreamConvert   := GetProcAddress(acmDLLHandle,'acmStreamConvert');
  817.         @acmStreamReset     := GetProcAddress(acmDLLHandle,'acmStreamReset');
  818.         @acmStreamPrepareHeader  := GetProcAddress(acmDLLHandle,'acmStreamPrepareHeader');
  819.         @acmStreamUnprepareHeader:= GetProcAddress(acmDLLHandle,'acmStreamUnprepareHeader');
  820.      end;
  821. {$IFDEF WIN32}
  822. Finalization
  823.      NewExitProc;
  824. {$ENDIF}
  825. end.