Class Sender
A DTMF (telephone-event) sender.
Inheritance
System.Object
MediaPipe<IAudioOutput, IAudioOutputCollection, IAudioInput, IAudioInputCollection, AudioPipe, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>
Sender
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: FM.LiveSwitch.Dtmf
Assembly: FM.LiveSwitch.dll
Syntax
public class Sender : AudioPipe, IAudioInput, IMediaInput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IInput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IAudioOutput, IMediaOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IAudioElement, IMediaElement, IElement
Constructors
Sender()
Initializes a new instance of the Sender class.
Declaration
public Sender()
Sender(Int32)
Initializes a new instance of the Sender class.
Declaration
public Sender(int clockRate)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | clockRate | The clock rate. |
Properties
Label
Gets a label that identifies this class.
Declaration
public override string Label { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
FM.LiveSwitch.MediaPipe<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioOutputCollection, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioPipe, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.Label
Tone
Gets the current tone.
Declaration
public Tone Tone { get; }
Property Value
Type | Description |
---|---|
Tone |
Methods
DoDestroy()
Destroys this instance.
Declaration
protected override void DoDestroy()
Overrides
FM.LiveSwitch.MediaPipe<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioOutputCollection, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioPipe, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.DoDestroy()
DoProcessFrame(AudioFrame, AudioBuffer)
Processes a frame.
Declaration
protected override void DoProcessFrame(AudioFrame frame, AudioBuffer inputBuffer)
Parameters
Type | Name | Description |
---|---|---|
AudioFrame | frame | The frame. |
AudioBuffer | inputBuffer | The input buffer. |
Overrides
FM.LiveSwitch.MediaPipe<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioOutputCollection, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioPipe, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.DoProcessFrame(FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer)
HasTone()
Determines whether any tones are queued for delivery.
Declaration
public bool HasTone()
Returns
Type | Description |
---|---|
System.Boolean |
InsertTones(Tone[])
Inserts tones into the DTMF stream.
Declaration
public void InsertTones(Tone[] tones)
Parameters
Type | Name | Description |
---|---|---|
Tone[] | tones | The tones. |
RaiseTone(Int32, Int64, Int64)
Adds the next tone to the frame.
Declaration
public bool RaiseTone(int duration, long timestamp, long synchronizationSource)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | duration | The duration. |
System.Int64 | timestamp | The timestamp. |
System.Int64 | synchronizationSource | The synchronization source. |
Returns
Type | Description |
---|---|
System.Boolean |
Events
OnTone
Raised when a tone is sent.
Declaration
public event Action1<Tone> OnTone
Event Type
Type | Description |
---|---|
Action1<Tone> |
OnToneChange
Raised when the tone changes. An empty string indicates the end of a tone.
Declaration
public event Action1<Tone> OnToneChange
Event Type
Type | Description |
---|---|
Action1<Tone> |