Class AudioSource
A Matroska-file-based audio source.
Inheritance
System.Object
MediaSource<IAudioOutput, IAudioInput, IAudioInputCollection, AudioSource, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>
AudioSource
Implements
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: FM.LiveSwitch.Matroska
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class AudioSource : AudioSource, IAudioOutput, IMediaOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IAudioElement, IMediaElement, IElement
Constructors
AudioSource(String)
Initializes a new instance of the AudioSource class.
Declaration
public AudioSource(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
Properties
Label
Gets the label.
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
Path
Gets the path.
Declaration
public string Path { get; }
Property Value
Type | Description |
---|---|
System.String |
StopCaptureOnEnd
Gets or sets whether capturing should stop when the file ends. Default: false.
Declaration
public bool StopCaptureOnEnd { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
CreateOpusDecoder(AudioConfig)
Creates an Opus decoder.
Declaration
protected abstract AudioDecoder CreateOpusDecoder(AudioConfig config)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config |
Returns
Type | Description |
---|---|
AudioDecoder |
CreatePcmaDecoder(AudioConfig)
Creates a PCMA decoder.
Declaration
protected virtual AudioDecoder CreatePcmaDecoder(AudioConfig config)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config |
Returns
Type | Description |
---|---|
AudioDecoder |
CreatePcmuDecoder(AudioConfig)
Creates a PCMU decoder.
Declaration
protected virtual AudioDecoder CreatePcmuDecoder(AudioConfig config)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config |
Returns
Type | Description |
---|---|
AudioDecoder |
DoDestroy()
Destroys this instance.
Declaration
protected override void DoDestroy()
Overrides
DoStart()
Starts the source.
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 the source.
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()
GetInputs()
Gets the source inputs (tracks).
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()
Events
OnEnded
Raised when the file ends.
Declaration
public event Action0 OnEnded
Event Type
Type | Description |
---|---|
Action0 |