Class Source
An NAudio-based source to capture sound from a microphone.
Inheritance
System.Object
MediaSource<IAudioOutput, IAudioInput, IAudioInputCollection, AudioSource, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>
Source
Implements
Inherited Members
Namespace: FM.LiveSwitch.NAudio
Assembly: FM.LiveSwitch.NAudio.dll
Syntax
public class Source : AudioSource, IAudioOutput, IMediaOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IAudioElement, IMediaElement, IElement
Constructors
Source(AudioConfig)
Initializes a new instance of the Source class.
Declaration
public Source(AudioConfig config)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config | The configuration. |
Properties
Label
Gets a label that identifies this class.
Declaration
public override string Label { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioSource, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.Label
NameSelector
Gets or sets the audio-name-based selector function.
Declaration
public Function1<string, bool> NameSelector { get; set; }
Property Value
Type | Description |
---|---|
Function1<System.String, System.Boolean> |
Methods
DoStart()
Starts this instance.
Declaration
protected override Future<object> DoStart()
Returns
Type | Description |
---|---|
Future<System.Object> |
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioSource, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.DoStart()
DoStop()
Stops this instance.
Declaration
protected override Future<object> DoStop()
Returns
Type | Description |
---|---|
Future<System.Object> |
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioSource, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.DoStop()
GetBufferDelay(AudioConfig)
Get buffer delay.
Declaration
public static int GetBufferDelay(AudioConfig config)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config | The config. |
Returns
Type | Description |
---|---|
System.Int32 |
GetInputs()
Gets the available inputs.
Declaration
public override Future<SourceInput[]> GetInputs()
Returns
Type | Description |
---|---|
Future<SourceInput[]> |
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IAudioOutput, FM.LiveSwitch.IAudioInput, FM.LiveSwitch.IAudioInputCollection, FM.LiveSwitch.AudioSource, FM.LiveSwitch.AudioFrame, FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat>.GetInputs()