Class WaveOutDest
Class that implements the NAudio IWaveProvider interface for the Wave API for the NAudio class library. Applications that use class library do not normally need to use this class.
Implements
Inherited Members
Namespace: SipLib.Audio.Windows
Assembly: SipLib.Audio.Windows.dll
Syntax
public class WaveOutDest : IWaveProvider
Constructors
WaveOutDest(WaveFormat)
Default constructor.
Declaration
public WaveOutDest(WaveFormat Wfmt)
Parameters
| Type | Name | Description |
|---|---|---|
| WaveFormat | Wfmt | WaveFormat object containing the format information for the audio samples. |
Properties
WaveFormat
Gets the WaveFormat object.
Declaration
public WaveFormat? WaveFormat { get; }
Property Value
| Type | Description |
|---|---|
| WaveFormat |
Methods
QueueSampleBlock(byte[])
Adds a block of samples to the sample block queue. These samples will be sent to the wave output when the wave API asks for more samples. Each sample block will contain 20 ms worth of audio. Each sample is 2 bytes long.
Declaration
public void QueueSampleBlock(byte[] SampleBlock)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | SampleBlock | Byte array containing the next block of audio samples. |
Read(byte[], int, int)
Called when the WAVE API needs byte to play to the output.
Declaration
public int Read(byte[] buffer, int offset, int count)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | buffer | Location to put the new sample bytes. |
| int | offset | Offset into buffer for the new sample bytes. |
| int | count | Number of bytes to write into buffer. Note: Each sample is two bytes long. |
Returns
| Type | Description |
|---|---|
| int | Returns the number of bytes actually written into buffer. |