Class SoundReframer
A pipe that reframes sound chunks into different durations.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class SoundReframer : 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
SoundReframer(AudioConfig)
Initializes a new instance of the SoundReframer class.
Declaration
public SoundReframer(AudioConfig config)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config | The configuration. |
SoundReframer(AudioConfig, Int32)
Initializes a new instance of the SoundReframer class.
Declaration
public SoundReframer(AudioConfig config, int frameDuration)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config | The configuration. |
System.Int32 | frameDuration | The frame duration. |
SoundReframer(IAudioOutput, Int32)
Initializes a new instance of the SoundReframer class.
Declaration
public SoundReframer(IAudioOutput input, int frameDuration)
Parameters
Type | Name | Description |
---|---|---|
IAudioOutput | input | The input. |
System.Int32 | frameDuration | The frame duration. |
Properties
DisableTimestampReset
Gets or sets whether the timestamp should be reset using the wall clock after TimestampResetInterval milliseconds elapse between frames.
Declaration
public bool DisableTimestampReset { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ForceTimestampReset
Gets or sets whether the timestamp should be reset before the next frame is processed.
Declaration
public bool ForceTimestampReset { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FrameDuration
Gets the frame duration in milliseconds. Defaults to 20.
Declaration
public int FrameDuration { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Label
Gets a label that identifies this class.
Declaration
public override string Label { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
TimestampResetInterval
Gets or sets the amount of time in milliseconds between audio frames that will trigger a reset of the timestamp to the wall clock. Defaults to 1000ms.
Declaration
public int TimestampResetInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
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. |