Table of Contents

Class WaveMixerStream32

Namespace
NAudio.Wave
Assembly
NAudio.Core.dll

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 bool

Automatically 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

bool

BlockAlign

public override int BlockAlign { get; }

Property Value

int

InputCount

The number of inputs to this mixer

public int InputCount { get; }

Property Value

int

Length

Length of this Wave Stream (in bytes) Length

public override long Length { get; }

Property Value

long

Position

Position within this Wave Stream (in bytes) Position

public override long Position { get; set; }

Property Value

long

WaveFormat

public override WaveFormat WaveFormat { get; }

Property Value

WaveFormat

Methods

AddInputStream(WaveStream)

Add a new input to the mixer

public void AddInputStream(WaveStream waveStream)

Parameters

waveStream WaveStream

The 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

buffer byte[]

buffer to read into

offset int

offset into buffer

count int

number of bytes required

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 WaveStream

waveStream to remove