| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- {========================================================================}
- {= (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 MMFXGen;
- {$I COMPILER.INC}
- interface
- uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinTypes,
- WinProcs,
- {$ENDIF}
- SysUtils,
- Messages,
- Classes,
- Controls,
- Forms,
- MMSystem,
- MMObj,
- MMDSPObj,
- MMUtils,
- MMString,
- MMRegs,
- MMPCMSup,
- MMMulDiv;
- const
- TabLen = 100000; { precalc table length }
- type
- EMMGeneratorError = class(Exception);
- TMMWaveForm = (wfSine,wfSquare,wfTriangle,wfSawtoothPos,
- wfSawtoothNeg,wfNoise);
- TMMModulation = (moAM,moFM,moPM);
- {-- TMMGenerator ------------------------------------------------------}
- TMMGenerator = class(TMMDSPComponent)
- public
- constructor Create(AOwner:TComponent); override;
- destructor Destroy; override;
- procedure Open;
- procedure Start;
- procedure Stop;
- procedure Close;
- published
- property Input;
- property Output;
- property Enabled: Boolean read FEnabled write FEnabled default True;
- property SampleRate: Longint read FSampleRate write SetSampleRate default 11025;
- property BitLength: TMMBits read FBits write setBits default b8bit;
- property Channel: TMMChannel read FChannel write setChannel default chBoth;
- property Mode: TMMMode read FMode write SetMode default mMono;
- property WaveForm: TMMWaveForm read FWaveForm write SetWaveForm default wfSine;
- property Modulation: TMMModulation read FModulation write SetModulation default moAM;
- property Frequency: Float read FFrequency write SetFrequency;
- property Amplitude: TMMVolumeRange index 0 read FAmplitude write SetAmplitudes default 16384;
- property DryAmplitude: TMMVolumeRange index 1 read FDryAmplitude write SetAmplitudes default 0;
- end;
- implementation
|