Beispiel #1
0
 /// <summary>
 /// Initialises a new instance of MeteringSampleProvider that raises 10 stream volume
 /// events per second
 /// </summary>
 /// <param name="source">Source sample provider</param>
 public BetterMeteringSampleProvider(ISampleProvider source)
 {
     this.source            = source;
     channels               = source.WaveFormat.Channels;
     maxSamples             = new float[channels];
     SamplesPerNotification = 100;
     args = new StreamVolumeEventArgs()
     {
         MaxSampleValues = maxSamples
     };                                                                   // create objects up front giving GC little to do
     downspeed = 1f / source.WaveFormat.SampleRate;
 }
Beispiel #2
0
 private void Meter_StreamVolume(object sender, StreamVolumeEventArgs e)
 {
 }