| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- {========================================================================}
- {= (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 MMTrigg;
- {$C FIXED PRELOAD PERMANENT}
- {$I COMPILER.INC}
- {.$DEFINE _MMDEBUG}
- interface
- uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinTypes,
- WinProcs,
- {$ENDIF}
- SysUtils,
- Messages,
- Classes,
- Graphics,
- Controls,
- Forms,
- Dialogs,
- MMSystem,
- MMUtils,
- MMString,
- MMObj,
- MMDSPObj,
- MMRegs,
- MMPCMSup,
- MMWaveIO;
- const
- {$IFDEF WIN32}
- TRIGGER_PRIORITY : integer = Thread_Priority_Normal;
- {$ENDIF}
- MINBUFFERSIZE = 32;
- type
- TMMTriggerStates = (trClose, trOpen, trPlay, trPause);
- TMMTriggerState = set of TMMTriggerStates;
- EMMTriggerError = class(Exception);
- {$IFDEF WIN32}
- TMMTrigger = class;
- {-- TMMTrigger ---------------------------------------------------------}
- TMMTrigger = class(TMMCustomSoundComponent)
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Open; virtual;
- procedure Close; virtual;
- procedure Start; virtual;
- procedure Pause; virtual;
- procedure Restart; virtual;
- procedure Stop; virtual;
- {$IFDEF WIN32}
- procedure SynchronizeVCL(VCLProc: TThreadMethod);
- {$ENDIF}
- property State: TMMTriggerState read FState;
- property Position: Longint read GetPosition;
- published
- { Events }
- property OnError: TNotifyEvent read FOnError write FOnError;
- property OnOpen: TNotifyEvent read FOnOpen write FOnOpen;
- property OnStart: TNotifyEvent read FOnStart write FOnStart;
- property OnPause: TNotifyEvent read FOnPause write FOnPause;
- property OnRestart: TNotifyEvent read FOnRestart write FOnRestart;
- property OnStop: TNotifyEvent read FOnStop write FOnStop;
- property OnClose: TNotifyEvent read FOnClose write FOnClose;
- property OnBufferFilled: TMMBufferEvent read FOnBufferFilled write FOnBufferFilled;
- property OnBufferReady;
- property OnBufferLoad;
- property Input;
- property Output;
- property BufferSize;
- property Interval: integer read FInterval write SetInterval default 1;
- property TimeFormat: TMMTimeFormats read FTimeFormat write SetTimeFormat default tfByte;
- end;
- implementation
|