Class WaveProvider16
Base class for creating a 16 bit wave provider
public abstract class WaveProvider16 : IWaveProvider
- Inheritance
-
WaveProvider16
- Implements
- Inherited Members
- Extension Methods
Constructors
WaveProvider16()
Initializes a new instance of the WaveProvider16 class defaulting to 44.1kHz mono
public WaveProvider16()
WaveProvider16(int, int)
Initializes a new instance of the WaveProvider16 class with the specified sample rate and number of channels
public WaveProvider16(int sampleRate, int channels)
Parameters
Properties
WaveFormat
The Wave Format
public WaveFormat WaveFormat { get; }
Property Value
Methods
Read(byte[], int, int)
Implements the Read method of IWaveProvider by delegating to the abstract Read method taking a short array
public int Read(byte[] buffer, int offset, int count)
Parameters
Returns
Read(short[], int, int)
Method to override in derived classes Supply the requested number of samples into the buffer
public abstract int Read(short[] buffer, int offset, int sampleCount)
Parameters
Returns
SetWaveFormat(int, int)
Allows you to specify the sample rate and channels for this WaveProvider (should be initialised before you pass it to a wave player)
public void SetWaveFormat(int sampleRate, int channels)