Simple stereo balancer: multiplies L/R samples independently. Expects stereo IEEE float (NAudio will convert upstream via ToSampleProvider()).
More...
|
| | StereoPanSampleProvider (ISampleProvider source) |
| | Initializes a new instance of the StereoPanSampleProvider class with the specified stereo sample source.
|
| int | Read (float[] buffer, int offset, int count) |
| | Reads samples from the source and applies independent left and right channel volume adjustments.
|
|
| float | LeftVolume [get, set] |
| | Gets or sets the volume multiplier for the left channel.
|
| float | RightVolume [get, set] |
| | Gets or sets the volume multiplier for the right channel.
|
| WaveFormat | WaveFormat [get] |
| | Gets the wave format of the sample provider.
|
Simple stereo balancer: multiplies L/R samples independently. Expects stereo IEEE float (NAudio will convert upstream via ToSampleProvider()).
◆ StereoPanSampleProvider()
| Gondwana.Audio.StereoPanSampleProvider.StereoPanSampleProvider |
( |
ISampleProvider | source | ) |
|
Initializes a new instance of the StereoPanSampleProvider class with the specified stereo sample source.
- Parameters
-
| source | The stereo sample source to apply panning to. Must be stereo (2 channels) and use IEEE float encoding. |
- Exceptions
-
| ArgumentException | Thrown when the source is not stereo (2 channels) or does not use IEEE float encoding. |
◆ Read()
| int Gondwana.Audio.StereoPanSampleProvider.Read |
( |
float[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
Reads samples from the source and applies independent left and right channel volume adjustments.
- Parameters
-
| buffer | The buffer to fill with samples. |
| offset | The offset in the buffer to start writing samples. |
| count | The number of samples to read. |
- Returns
- The number of samples actually read from the source.
◆ LeftVolume
| float Gondwana.Audio.StereoPanSampleProvider.LeftVolume |
|
getset |
Gets or sets the volume multiplier for the left channel.
A value of 1.0 represents full volume. Values between 0.0 and 1.0 reduce volume, while values greater than 1.0 can provide gain.
◆ RightVolume
| float Gondwana.Audio.StereoPanSampleProvider.RightVolume |
|
getset |
Gets or sets the volume multiplier for the right channel.
A value of 1.0 represents full volume. Values between 0.0 and 1.0 reduce volume, while values greater than 1.0 can provide gain.
◆ WaveFormat
| WaveFormat Gondwana.Audio.StereoPanSampleProvider.WaveFormat |
|
get |
Gets the wave format of the sample provider.
Returns the wave format from the underlying source provider.