Esempio n. 1
0
 /// <summary>Start calibration.</summary>
 /// <param name="durationMs">Duration of the calibration procedure (in milliseconds).</param>
 /// This activates the Calibration process.
 /// It will reset the given LevelMeter's AccumAvgPeakAmp (accumulated average peak amplitude),
 /// and when the duration has passed, use it for the VoiceDetector's detection threshold.
 public void Calibrate(int durationMs, Action <float> onCalibrated = null)
 {
     this.calibrateCount = valuesPerSec * durationMs / 1000;
     this.onCalibrated   = onCalibrated;
     levelMeter.ResetAccumAvgPeakAmp();
 }
Esempio n. 2
0
 public void VoiceDetectorCalibrate(int durationMs)
 {
     this.voiceDetectorCalibrateCount = samplesPerSec * durationMs / 1000;
     levelMeter.ResetAccumAvgPeakAmp();
 }
Esempio n. 3
0
 /// <summary>Start calibration.</summary>
 /// <param name="durationMs">Duration of the calibration procedure (in milliseconds).</param>
 /// This activates the Calibration process.
 /// It will reset the given LevelMeter's AccumAvgPeakAmp (accumulated average peak amplitude),
 /// and when the duration has passed, use it for the VoiceDetector's detection threshold.
 public void Calibrate(int durationMs)
 {
     this.calibrateCount = valuesPerSec * durationMs / 1000;
     levelMeter.ResetAccumAvgPeakAmp();
 }