Utility class that takes an IWaveProvider input at any bit depth and exposes it as an ISampleProvider. Can turn mono inputs into stereo, and allows adjusting of volume (The eventual successor to WaveChannel32) This class also serves as an example of how you can link together several simple Sample Providers to form a more useful class.
More...
|
| SampleChannel (IWaveProvider waveProvider) |
| Initialises a new instance of SampleChannel.
|
|
| SampleChannel (IWaveProvider waveProvider, bool forceStereo) |
| Initialises a new instance of SampleChannel.
|
|
int | Read (float[] buffer, int offset, int sampleCount) |
| Reads audio samples from the volume provider and stores them in the buffer starting at the specified offset.
|
|
Utility class that takes an IWaveProvider input at any bit depth and exposes it as an ISampleProvider. Can turn mono inputs into stereo, and allows adjusting of volume (The eventual successor to WaveChannel32) This class also serves as an example of how you can link together several simple Sample Providers to form a more useful class.
◆ SampleChannel() [1/2]
NAudio.Wave.SampleProviders.SampleChannel.SampleChannel |
( |
IWaveProvider | waveProvider | ) |
|
|
inline |
Initialises a new instance of SampleChannel.
- Parameters
-
waveProvider | Source wave provider, must be PCM or IEEE |
◆ SampleChannel() [2/2]
NAudio.Wave.SampleProviders.SampleChannel.SampleChannel |
( |
IWaveProvider | waveProvider, |
|
|
bool | forceStereo ) |
|
inline |
Initialises a new instance of SampleChannel.
- Parameters
-
waveProvider | Source wave provider, must be PCM or IEEE |
forceStereo | force mono inputs to become stereo |
◆ Read()
int NAudio.Wave.SampleProviders.SampleChannel.Read |
( |
float[] | buffer, |
|
|
int | offset, |
|
|
int | sampleCount ) |
|
inline |
Reads audio samples from the volume provider and stores them in the buffer starting at the specified offset.
- Parameters
-
buffer | The array to store the audio samples. |
offset | The zero-based index in buffer at which to begin storing the samples. |
sampleCount | The number of audio samples to read. |
- Returns
- The total number of samples read into the buffer.
Implements NAudio.Wave.ISampleProvider.
◆ preVolumeMeter
◆ volumeProvider
◆ waveFormat
readonly WaveFormat NAudio.Wave.SampleProviders.SampleChannel.waveFormat |
|
private |
◆ PreVolumeMeter
Raised periodically to inform the user of the max volume (before the volume meter)
◆ Volume
float NAudio.Wave.SampleProviders.SampleChannel.Volume |
|
getset |
Allows adjusting the volume, 1.0f = full volume.
◆ WaveFormat
WaveFormat NAudio.Wave.SampleProviders.SampleChannel.WaveFormat |
|
get |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Core/Wave/SampleProviders/SampleChannel.cs