public PanningSampleProvider(ISampleProvider source) { if (source.WaveFormat.Channels != 1) { throw new ArgumentException("Source sample provider must be mono"); } this.source = source; this.waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(source.WaveFormat.SampleRate, 2); this.panStrategy = new SinPanStrategy(); }
/// <summary> /// Initialises a new instance of the PanningSampleProvider /// </summary> /// <param name="source">Source sample provider, must be mono</param> public PanningSampleProvider(ISampleProvider source) { if (source.WaveFormat.Channels != 1) { throw new ArgumentException("Source sample provider must be mono"); } this.source = source; this.waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(source.WaveFormat.SampleRate, 2); this.panStrategy = new SinPanStrategy(); }