| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- {========================================================================}
- {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
- {========================================================================}
- {= All Rights Reserved =}
- {========================================================================}
- {= D 01099 Dresden = Tel.: +0351-8012255 =}
- {= Loewenstr.7a = info@swiftsoft.de =}
- {========================================================================}
- {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
- {========================================================================}
- {= This code is for reference purposes only and may not be copied or =}
- {= distributed in any format electronic or otherwise except one copy =}
- {= for backup purposes. =}
- {= =}
- {= No Delphi Component Kit or Component individually or in a collection=}
- {= subclassed or otherwise from the code in this unit, or associated =}
- {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
- {= without express permission from SwiftSoft. =}
- {= =}
- {= For more licence informations please refer to the associated =}
- {= HelpFile. =}
- {========================================================================}
- {= $Date: 20.01.1998 - 18:00:00 $ =}
- {========================================================================}
- Unit MMACMDlg;
- {$I COMPILER.INC}
- interface
- uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinTypes,
- WinProcs,
- {$ENDIF}
- SysUtils,
- Classes,
- Controls,
- Forms,
- Dialogs,
- DsgnIntf,
- MMSystem,
- MMUtils,
- MMObj,
- MMRegs,
- MMRiff,
- MMWaveIO,
- MMWave,
- MMACM;
- type
- EMMACMError = class(Exception);
- TMMACMEnumFormats = (efAll,efInput,efOutput,efConvert,efSuggest);
- {-- TMMACM ---------------------------------------------------------}
- TMMACM = class(TMMComponent)
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure AllocWaveHeader(var pwfx: PWaveFormatEx);
- procedure FreeWaveHeader(var pwfx: PWaveFormatEX);
- procedure AllocWaveFilter(var pwfltr: PWaveFilter);
- procedure FreeWaveFilter(var pwfltr: PWaveFilter);
- function GetFormatDescription(pwfx: PWaveFormatEx;var sFormatTag,sFormat: String): Boolean;
- function GetFilterDescription(pwfltr: PWaveFilter;var sFilterTag,sFilter: String): Boolean;
- function SuggestFormat(pwfxSrc: PWaveFormatEx; dwSuggest: Longint): Boolean;
- function ChooseFormat(pwfxSrc: PWaveFormatEx; Title: String): Boolean;
- function ChooseFilter(pwfltrSrc: PWaveFilter; Title: String): Boolean;
- function QueryConvert(pwfxDst: PWaveFormatEx; pwfltr: PWaveFilter): Boolean;
- function ProcessFile(const FileName: TFileName; pwfxDst: PWaveFormatEx; pwfltr: PWaveFilter): Boolean;
- function FilterFile(const FileName: TFileName): Boolean;
- function CreateFile(const FileName: TFileName): Boolean;
- function ConvertFile(const FileName: TFileName): Boolean;
- property DriverVersion: Longint read FacmVersion;
- property PWaveFormat: PWaveFormatEx read FPWaveFormatEx write SetPWaveFormat;
- property PFilter: PWaveFilter read FPWaveFilter write SetPWaveFilter;
- property Wave: TMMWave read GetWave;
- published
- property ACMPresent: Boolean read FACMPresent write SetACMPresent;
- property NumDrivers: Longint read FNumDrivers write SetNumDrivers;
- property NumCodecs: Longint read FNumCodecs write SetNumDrivers;
- property NumConverters: Longint read FNumConverters write SetNumDrivers;
- property NumFilters: Longint read FNumFilters write SetNumDrivers;
- property EnumFormats: TMMACMEnumFormats read FEnumFormats write FEnumFormats default efAll;
- property Title: String read FTitle write FTitle;
- property Source: TMMCustomWaveFile read FSource write SetSource;
- end;
- function acmBuildTrueSpeechHeader: PTrueSpeechWaveFormat;
- function acmGetFormatDescription(pwfx: PWaveFormatEx; var sFormatTag,sFormat: String): Boolean;
- function acmGetFilterDescription(pwfltr: PWaveFilter; var sFilterTag,sFilter: String): Boolean;
- implementation
|