/// <summary>
 /// Initialises a new instance of MeteringSampleProvider 
 /// </summary>
 /// <param name="source">source sampler provider</param>
 /// <param name="samplesPerNotification">Number of samples between notifications</param>
 public MeteringSampleProvider(ISampleProvider source, int samplesPerNotification)
 {
     this.source = source;
     this.channels = source.WaveFormat.Channels;
     this.maxSamples = new float[channels];
     this.SamplesPerNotification = samplesPerNotification;
     this.args = new StreamVolumeEventArgs() { MaxSampleValues = this.maxSamples }; // create objects up front giving GC little to do
 }
 /// <summary>
 /// Initialises a new instance of MeteringSampleProvider
 /// </summary>
 /// <param name="source">source sampler provider</param>
 /// <param name="samplesPerNotification">Number of samples between notifications</param>
 public MeteringSampleProvider(ISampleProvider source, int samplesPerNotification)
 {
     this.source                 = source;
     this.channels               = source.WaveFormat.Channels;
     this.maxSamples             = new float[channels];
     this.SamplesPerNotification = samplesPerNotification;
     this.args = new StreamVolumeEventArgs()
     {
         MaxSampleValues = this.maxSamples
     };                                                                             // create objects up front giving GC little to do
 }