C# Class GSF.Media.Sound.DTMF

Dual Tone Multi-Frequency Class.
Datei anzeigen Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Properties

Property Type Description
Duration double
HighFrequency double
LowFrequency double

Public Methods

Method Description
ComputeFrequencies ( DTMF tone, long sampleIndex, int sampleRate ) : double

Computes a dual-tone multi-frequency sound for the given DTMF information and time.

This method computes an amplitude representing the acoustic pressure of a DTMF of the given frequency for the given time.

DTMF ( ) : System

Constructs a new DTMF.

DTMF ( double lowFrequency, double highFrequency, double duration ) : System

Constructs a new DTMF using specified parameters.

Generate ( WaveFile destination, DTMF tone, double volume ) : void

Generates the specified dual-tone multi-frequency storing it in the specified WaveFile.

Generate ( WaveFile destination, DTMF tone, double volume, int repeatCount ) : void

Generates the specified dual-tone multi-frequency repeatCount times storing it in the specified WaveFile.

Method Details

ComputeFrequencies() public static method

Computes a dual-tone multi-frequency sound for the given DTMF information and time.
This method computes an amplitude representing the acoustic pressure of a DTMF of the given frequency for the given time.
public static ComputeFrequencies ( DTMF tone, long sampleIndex, int sampleRate ) : double
tone DTMF Instance of the specifying the duration as well as the low and high frequencies of the dual-tone.
sampleIndex long Sample index (represents time anywhere from zero to full length of tone).
sampleRate int Number of samples per second.
return double

DTMF() public method

Constructs a new DTMF.
public DTMF ( ) : System
return System

DTMF() public method

Constructs a new DTMF using specified parameters.
public DTMF ( double lowFrequency, double highFrequency, double duration ) : System
lowFrequency double A low frequency value.
highFrequency double A high frequency value.
duration double A duration value.
return System

Generate() public static method

Generates the specified dual-tone multi-frequency storing it in the specified WaveFile.
public static Generate ( WaveFile destination, DTMF tone, double volume ) : void
destination WaveFile used to store generated dual-tone multi-frequencies.
tone DTMF Dual-tone multi-frequency to generate.
volume double Volume of generated dual-tones as a percentage (0 to 1).
return void

Generate() public static method

Generates the specified dual-tone multi-frequency repeatCount times storing it in the specified WaveFile.
public static Generate ( WaveFile destination, DTMF tone, double volume, int repeatCount ) : void
destination WaveFile used to store generated dual-tone multi-frequencies.
tone DTMF Dual-tone multi-frequency to generate.
volume double Volume of generated dual-tones as a percentage (0 to 1).
repeatCount int Number of times to repeat the tone.
return void

Property Details

Duration public_oe property

Frequency duration, in seconds, of DTMF.
public double Duration
return double

HighFrequency public_oe property

High frequency of DTMF.
public double HighFrequency
return double

LowFrequency public_oe property

Low frequency of DTMF.
public double LowFrequency
return double