Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of MonoToStereoSampleProvider
 /// </summary>
 /// <param name="source">Source sample provider</param>
 public MonoToStereoSampleProvider(ISampleProvider source)
 {
     if (source.WaveFormat.Channels != 1)
     {
         throw new ArgumentException("Source must be mono");
     }
     this.source     = source;
     this.waveFormat = WaveFormatProvider.CreateIeeeFloatWaveFormat(source.WaveFormat.SampleRate, 2);
 }
Beispiel #2
0
 /// <summary>
 /// Initialises a new instance of SampleProviderConverterBase
 /// </summary>
 /// <param name="source">Source Wave provider</param>
 public SampleProviderConverterBase(IWaveProvider source)
 {
     this.source     = source;
     this.waveFormat = WaveFormatProvider.CreateIeeeFloatWaveFormat(source.WaveFormat.SampleRate, source.WaveFormat.Channels);
 }