Class WaveMixerStream32
WaveStream that can mix together multiple 32 bit input streams (Normally used with stereo input channels) All channels must have the same number of inputs
public class WaveMixerStream32 : WaveStream, IDisposable, IAsyncDisposable, IWaveProvider
- Inheritance
-
WaveMixerStream32
- Implements
- Inherited Members
- Extension Methods
Constructors
WaveMixerStream32()
Creates a new 32 bit WaveMixerStream
public WaveMixerStream32()
WaveMixerStream32(IEnumerable<WaveStream>, bool)
Creates a new 32 bit WaveMixerStream
public WaveMixerStream32(IEnumerable<WaveStream> inputStreams, bool autoStop)
Parameters
inputStreams
IEnumerable<WaveStream>An Array of WaveStreams - must all have the same format. Use WaveChannel is designed for this purpose.
autoStop
boolAutomatically stop when all inputs have been read
Exceptions
- ArgumentException
Thrown if the input streams are not 32 bit floating point, or if they have different formats to each other
Properties
AutoStop
Automatically stop when all inputs have been read
public bool AutoStop { get; set; }
Property Value
BlockAlign
public override int BlockAlign { get; }
Property Value
InputCount
The number of inputs to this mixer
public int InputCount { get; }
Property Value
Length
Length of this Wave Stream (in bytes) Length
public override long Length { get; }
Property Value
Position
Position within this Wave Stream (in bytes) Position
public override long Position { get; set; }
Property Value
WaveFormat
public override WaveFormat WaveFormat { get; }
Property Value
Methods
AddInputStream(WaveStream)
Add a new input to the mixer
public void AddInputStream(WaveStream waveStream)
Parameters
waveStream
WaveStreamThe wave input to add
Dispose(bool)
Disposes this WaveStream
protected override void Dispose(bool disposing)
Parameters
disposing
bool
Read(byte[], int, int)
Reads bytes from this wave stream
public override int Read(byte[] buffer, int offset, int count)
Parameters
Returns
- int
Number of bytes read.
Exceptions
- ArgumentException
Thrown if an invalid number of bytes requested
RemoveInputStream(WaveStream)
Remove a WaveStream from the mixer
public void RemoveInputStream(WaveStream waveStream)
Parameters
waveStream
WaveStreamwaveStream to remove