Class AudioMixer
A mixer that mixes multiple audio inputs into a single output.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class AudioMixer : 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
AudioMixer(AudioConfig)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(AudioConfig config)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config | The configuration. |
AudioMixer(AudioConfig, Int32)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(AudioConfig config, int latency)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config | The configuration. |
System.Int32 | latency | The latency in milliseconds. |
AudioMixer(AudioConfig, Int32, Int32)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(AudioConfig config, int latency, int frameDuration)
Parameters
Type | Name | Description |
---|---|---|
AudioConfig | config | The configuration. |
System.Int32 | latency | The latency in milliseconds. |
System.Int32 | frameDuration | The output frame duration in milliseconds. |
AudioMixer(AudioFormat)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(AudioFormat format)
Parameters
Type | Name | Description |
---|---|---|
AudioFormat | format | The format. |
AudioMixer(AudioFormat, Int32)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(AudioFormat format, int latency)
Parameters
Type | Name | Description |
---|---|---|
AudioFormat | format | The format. |
System.Int32 | latency | The latency in milliseconds. |
AudioMixer(AudioFormat, Int32, Int32)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(AudioFormat format, int latency, int frameDuration)
Parameters
Type | Name | Description |
---|---|---|
AudioFormat | format | The format. |
System.Int32 | latency | The latency in milliseconds. |
System.Int32 | frameDuration | The output frame duration in milliseconds. |
AudioMixer(IAudioOutput)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(IAudioOutput input)
Parameters
Type | Name | Description |
---|---|---|
IAudioOutput | input | The input. |
AudioMixer(IAudioOutput, Int32)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(IAudioOutput input, int latency)
Parameters
Type | Name | Description |
---|---|---|
IAudioOutput | input | The input. |
System.Int32 | latency | The latency in milliseconds. |
AudioMixer(IAudioOutput, Int32, Int32)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(IAudioOutput input, int latency, int frameDuration)
Parameters
Type | Name | Description |
---|---|---|
IAudioOutput | input | The input. |
System.Int32 | latency | The latency in milliseconds. |
System.Int32 | frameDuration | The output frame duration in milliseconds. |
AudioMixer(IAudioOutput[])
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(IAudioOutput[] inputs)
Parameters
Type | Name | Description |
---|---|---|
IAudioOutput[] | inputs | The inputs. |
AudioMixer(IAudioOutput[], Int32)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(IAudioOutput[] inputs, int latency)
Parameters
Type | Name | Description |
---|---|---|
IAudioOutput[] | inputs | The inputs. |
System.Int32 | latency | The latency in milliseconds. |
AudioMixer(IAudioOutput[], Int32, Int32)
Initializes a new instance of the AudioMixer class.
Declaration
public AudioMixer(IAudioOutput[] inputs, int latency, int frameDuration)
Parameters
Type | Name | Description |
---|---|---|
IAudioOutput[] | inputs | The inputs. |
System.Int32 | latency | The latency in milliseconds. |
System.Int32 | frameDuration | The output frame duration in milliseconds. |
Properties
AllowDurationTimer
Gets whether this media pipe output rate is allowed to be timed.
Declaration
protected override bool AllowDurationTimer { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
AllowInputRateTimer
Gets whether this media pipe input rate is allowed to be timed.
Declaration
protected override bool AllowInputRateTimer { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
FrameDuration
Gets the frame duration in milliseconds. Defaults to 20.
Declaration
public int FrameDuration { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsMixer
Gets whether this pipe processes media from different sources.
Declaration
protected override bool IsMixer { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Label
Gets a label that identifies this class.
Declaration
public override string Label { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Latency
Gets the latency.
Declaration
public int Latency { get; }
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. |