Method SetChannelGain
SetChannelGain(float[], double)
Sets the per-channel gain of the source to a separate level for each output channel over the specified duration.
public void SetChannelGain(float[] values, double duration)
Parameters
valuesfloat[]The gain level for each output channel, where 1 represents the original signal amplitude. The number of values must be equal to the number of channels.
durationdoubleThe length of the gain ramp, in seconds. A duration of zero changes the gain immediately.
Remarks
The per-channel gain is independent of the source gain. The effective gain applied to a channel is the product of the source gain and the per-channel gain for that channel.
Exceptions
- ArgumentNullException
The array of values is null.
- ArgumentException
The number of values is not equal to the number of channels.