Show / Hide Table of Contents

Class SignalGenerator

Signal Generator Sin, Square, Triangle, SawTooth, White Noise, Pink Noise, Sweep.

Inheritance
System.Object
SignalGenerator
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SIPSorcery.Media
Assembly: SIPSorcery.dll
Syntax
public class SignalGenerator
Remarks

Posibility to change ISampleProvider Example :

WaveOut _waveOutGene = new WaveOut(); WaveGenerator wg = new SignalGenerator(); wg.Type = ... wg.Frequency = ... wg ... _waveOutGene.Init(wg); _waveOutGene.Play();

Constructors

| Improve this Doc View Source

SignalGenerator()

Initializes a new instance for the Generator (Default :: 44.1Khz, 2 channels, Sinus, Frequency = 440, Gain = 1)

Declaration
public SignalGenerator()
| Improve this Doc View Source

SignalGenerator(Int32, Int32)

Initializes a new instance for the Generator (UserDef SampleRate & Channels)

Declaration
public SignalGenerator(int sampleRate, int channels)
Parameters
Type Name Description
System.Int32 sampleRate

Desired sample rate

System.Int32 channels

Number of channels

Properties

| Improve this Doc View Source

Channels

Declaration
public int Channels { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Frequency

Frequency for the Generator. (20.0 - 20000.0 Hz) Sin, Square, Triangle, SawTooth, Sweep (Start Frequency).

Declaration
public double Frequency { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

FrequencyEnd

End Frequency for the Sweep Generator. (Start Frequency in Frequency)

Declaration
public double FrequencyEnd { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

FrequencyEndLog

Return Log of Frequency End (Read only)

Declaration
public double FrequencyEndLog { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

FrequencyLog

Return Log of Frequency Start (Read only)

Declaration
public double FrequencyLog { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Gain

Gain for the Generator. (0.0 to 1.0)

Declaration
public double Gain { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

PhaseReverse

Channel PhaseReverse

Declaration
public bool[] PhaseReverse { get; }
Property Value
Type Description
System.Boolean[]
| Improve this Doc View Source

SampleRate

Declaration
public int SampleRate { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

SweepLengthSecs

Length Seconds for the Sweep Generator.

Declaration
public double SweepLengthSecs { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Type

Type of Generator.

Declaration
public SignalGeneratorType Type { get; set; }
Property Value
Type Description
SignalGeneratorType

Methods

| Improve this Doc View Source

Read(Single[], Int32, Int32)

Reads from this provider.

Declaration
public int Read(float[] buffer, int offset, int count)
Parameters
Type Name Description
System.Single[] buffer
System.Int32 offset
System.Int32 count
Returns
Type Description
System.Int32

Extension Methods

JSONWriter.ToJson(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX