Class SilenceAudioSampleSource
Class for sending silence audio samples. This class sends a block of samples with a value of 0 every 20 milliseconds. Each sample is a 16-bit linear PCM format sample with a value of 0. The AudioSamplesReady event is fired every 20 milliseconds after the Start() method is called.
An instance of this class may be used to send silence to multiple calls. To do this, create a single instance of this class, then call the Start() method once. multiple AudioSource classes can then hook the AudioSamples event to receive the audio samples. Do not call the Stop() method until the application shuts down.
Implements
Inherited Members
Namespace: SipLib.Media
Assembly: SipLib.dll
Syntax
public class SilenceAudioSampleSource : IAudioSampleSource
Constructors
| Edit this page View SourceSilenceAudioSampleSource()
Constructor. Call the Start() method after calling the constructor.
Declaration
public SilenceAudioSampleSource()
Methods
| Edit this page View SourceStart()
Starts sending audio sample packets.
Declaration
public void Start()
Stop()
Stops sending audio sample packets. This method must be called when this object is no longer required.
Declaration
public void Stop()
Events
| Edit this page View SourceAudioSamplesReady
This event is fired every 20 milliseconds to provide new audio samples to send. Unhook this event when audio samples are no longer required.
Declaration
public event AudioSamplesReadyDelegate AudioSamplesReady
Event Type
Type | Description |
---|---|
AudioSamplesReadyDelegate |