| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- {========================================================================}
- {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
- {========================================================================}
- {= All Rights Reserved =}
- {========================================================================}
- {= D 01099 Dresden = Fax.: +49 (0)351-8037944 =}
- {= 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: 13.04.98 - 15:32:17 $ =}
- {========================================================================}
- unit MMAudio;
- {$I COMPILER.INC}
- interface
- uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinTypes,
- WinProcs,
- {$ENDIF}
- SysUtils,
- Classes,
- Controls,
- MMSystem,
- MMObj,
- MMString,
- MMDSPobj,
- MMRegs,
- MMUtils,
- MMWave,
- MMWaveIO,
- MMMpeg,
- MMMPType,
- MMFade,
- MMACMCvt;
- type
- EMMAudioError = class(Exception);
- TMMAudioFileType = (ftWave,ftMpeg);
- {-- TMMAudioFile ----------------------------------------------------------}
- TMMAudioFile = class(TMMDSPComponent)
- public
- constructor Create(aOwner: TComponent); override;
- destructor Destroy; override;
- procedure LoadFromFile(const aFileName: String);
- procedure FreeFile;
- procedure FadeOut(Duration: Longint);
- property Empty: Boolean read GetEmpty;
- property SampleRate: Longint read GetSampleRate;
- property BitRate: integer read GetBitRate;
- property ChannelMode: TMMMode read GetChannelMode;
- property Position: Longint read GetPosition write SetPosition;
- property FileLength: Longint read GetFileLength;
- property PlayLength: Longint read GetPlayLength write SetPlayLength;
- property FadeInDuration: Longint read FFadeInDuration write SetFadeInDuration;
- property FadeOutDuration: Longint read FFadeOutDuration write SetFadeOutDuration;
- property FadeOutPosition: LongInt read FFadeOutPosition write SetFadeOutPosition;
- published
- property Output;
- property Enabled: Boolean read FEnabled write FEnabled default True;
- property MpegTrailingHeader: Longint read GetTrailingHeader write SetTrailingHeader;
- property FileName: TFileName read GetFileName write SetFileName;
- property FileType: TMMAudioFileType read GetFileType write SetFileType stored False;
- property Volume: Longint read FVolume write SetVolume default VOLUMEBASE;
- property Panning: Longint read FPanning write SetPanning default 0;
- end;
- function IsValidAudioFile(FileName: TFileName): Boolean;
- procedure Register;
|