Class AudioSink
A WAVE-file-based audio sink.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch.Wave
Assembly: FM.LiveSwitch.dll
Syntax
public class AudioSink : AudioSink, IAudioInput, IMediaInput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IInput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IAudioElement, IMediaElement, IElement
Constructors
AudioSink(String, AudioFormat)
Initializes a new instance of the AudioSink class.
Declaration
public AudioSink(string path, AudioFormat format)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
AudioFormat | format | The format. |
AudioSink(String, IAudioOutput)
Initializes a new instance of the AudioSink class.
Declaration
public AudioSink(string path, IAudioOutput input)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
IAudioOutput | input | The input. |
Properties
BaseTimestamp
Gets the base timestamp - the timestamp of the first frame processed by the recorder after being activated. This timestamp will change each time a new file is created in response to the sink being activated.
Declaration
public long BaseTimestamp { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Label
Gets a label that identifies this class.
Declaration
public override string Label { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
LastFilePath
Gets the last known file path.
Declaration
public string LastFilePath { get; }
Property Value
Type | Description |
---|---|
System.String |
LastTimestamp
Gets the last timestamp processed by the recorder.
Declaration
public long LastTimestamp { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
OpenFilePath
Gets the currently open file path.
Declaration
public string OpenFilePath { get; }
Property Value
Type | Description |
---|---|
System.String |
Path
Gets the path.
Declaration
public string Path { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
DoDestroy()
Destroys this instance.
Declaration
protected override void DoDestroy()
Overrides
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
Events
OnFileClose
Raised when an existing file is close in response to this sink being deactivated or destroyed.
Declaration
public event Action0 OnFileClose
Event Type
Type | Description |
---|---|
Action0 |
OnFileOpen
Raised when a new file is opened in response to this sink being activated and processing a frame.
Declaration
public event Action0 OnFileOpen
Event Type
Type | Description |
---|---|
Action0 |