MMACMDLG.INT 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Tel.: +0351-8012255 =}
  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: 20.01.1998 - 18:00:00 $ =}
  24. {========================================================================}
  25. Unit MMACMDlg;
  26. {$I COMPILER.INC}
  27. interface
  28. uses
  29. {$IFDEF WIN32}
  30. Windows,
  31. {$ELSE}
  32. WinTypes,
  33. WinProcs,
  34. {$ENDIF}
  35. SysUtils,
  36. Classes,
  37. Controls,
  38. Forms,
  39. Dialogs,
  40. DsgnIntf,
  41. MMSystem,
  42. MMUtils,
  43. MMObj,
  44. MMRegs,
  45. MMRiff,
  46. MMWaveIO,
  47. MMWave,
  48. MMACM;
  49. type
  50. EMMACMError = class(Exception);
  51. TMMACMEnumFormats = (efAll,efInput,efOutput,efConvert,efSuggest);
  52. {-- TMMACM ---------------------------------------------------------}
  53. TMMACM = class(TMMComponent)
  54. public
  55. constructor Create(AOwner: TComponent); override;
  56. destructor Destroy; override;
  57. procedure AllocWaveHeader(var pwfx: PWaveFormatEx);
  58. procedure FreeWaveHeader(var pwfx: PWaveFormatEX);
  59. procedure AllocWaveFilter(var pwfltr: PWaveFilter);
  60. procedure FreeWaveFilter(var pwfltr: PWaveFilter);
  61. function GetFormatDescription(pwfx: PWaveFormatEx;var sFormatTag,sFormat: String): Boolean;
  62. function GetFilterDescription(pwfltr: PWaveFilter;var sFilterTag,sFilter: String): Boolean;
  63. function SuggestFormat(pwfxSrc: PWaveFormatEx; dwSuggest: Longint): Boolean;
  64. function ChooseFormat(pwfxSrc: PWaveFormatEx; Title: String): Boolean;
  65. function ChooseFilter(pwfltrSrc: PWaveFilter; Title: String): Boolean;
  66. function QueryConvert(pwfxDst: PWaveFormatEx; pwfltr: PWaveFilter): Boolean;
  67. function ProcessFile(const FileName: TFileName; pwfxDst: PWaveFormatEx; pwfltr: PWaveFilter): Boolean;
  68. function FilterFile(const FileName: TFileName): Boolean;
  69. function CreateFile(const FileName: TFileName): Boolean;
  70. function ConvertFile(const FileName: TFileName): Boolean;
  71. property DriverVersion: Longint read FacmVersion;
  72. property PWaveFormat: PWaveFormatEx read FPWaveFormatEx write SetPWaveFormat;
  73. property PFilter: PWaveFilter read FPWaveFilter write SetPWaveFilter;
  74. property Wave: TMMWave read GetWave;
  75. published
  76. property ACMPresent: Boolean read FACMPresent write SetACMPresent;
  77. property NumDrivers: Longint read FNumDrivers write SetNumDrivers;
  78. property NumCodecs: Longint read FNumCodecs write SetNumDrivers;
  79. property NumConverters: Longint read FNumConverters write SetNumDrivers;
  80. property NumFilters: Longint read FNumFilters write SetNumDrivers;
  81. property EnumFormats: TMMACMEnumFormats read FEnumFormats write FEnumFormats default efAll;
  82. property Title: String read FTitle write FTitle;
  83. property Source: TMMCustomWaveFile read FSource write SetSource;
  84. end;
  85. function acmBuildTrueSpeechHeader: PTrueSpeechWaveFormat;
  86. function acmGetFormatDescription(pwfx: PWaveFormatEx; var sFormatTag,sFormat: String): Boolean;
  87. function acmGetFilterDescription(pwfltr: PWaveFilter; var sFilterTag,sFilter: String): Boolean;
  88. implementation