Class WaveChannel32
Represents Channel for the WaveMixerStream 32 bit output and 16 bit input It's output is always stereo The input stream can be panned
public class WaveChannel32 : WaveStream, IDisposable, IAsyncDisposable, IWaveProvider, ISampleNotifier
- Inheritance
-
WaveChannel32
- Implements
- Inherited Members
- Extension Methods
Constructors
WaveChannel32(WaveStream)
Creates a WaveChannel32 with default settings
public WaveChannel32(WaveStream sourceStream)
Parameters
sourceStream
WaveStreamThe source stream
WaveChannel32(WaveStream, float, float)
Creates a new WaveChannel32
public WaveChannel32(WaveStream sourceStream, float volume, float pan)
Parameters
sourceStream
WaveStreamthe source stream
volume
floatstream volume (1 is 0dB)
pan
floatpan control (-1 to 1)
Properties
BlockAlign
Gets the block alignment for this WaveStream
public override int BlockAlign { get; }
Property Value
Length
Returns the stream length
public override long Length { get; }
Property Value
PadWithZeroes
If true, Read always returns the number of bytes requested
public bool PadWithZeroes { get; set; }
Property Value
Pan
Pan of this channel (from -1 to 1)
public float Pan { get; set; }
Property Value
Position
Gets or sets the current position in the stream
public override long Position { get; set; }
Property Value
Volume
Volume of this channel. 1.0 = full scale
public float Volume { get; set; }
Property Value
WaveFormat
public override WaveFormat WaveFormat { get; }
Property Value
Methods
Dispose(bool)
Disposes this WaveStream
protected override void Dispose(bool disposing)
Parameters
disposing
bool
HasData(int)
Determines whether this channel has any data to play to allow optimisation to not read, but bump position forward
public override bool HasData(int count)
Parameters
count
int
Returns
Read(byte[], int, int)
Reads bytes from this wave stream
public override int Read(byte[] destBuffer, int offset, int numBytes)
Parameters
destBuffer
byte[]The destination buffer
offset
intOffset into the destination buffer
numBytes
intNumber of bytes read
Returns
- int
Number of bytes read.
Events
Sample
Sample
public event EventHandler<SampleEventArgs> Sample