AudioSpectrum constructor

AudioSpectrum({
  1. int samplingRate = 44100,
  2. BandType bandType = BandType.tenBand,
  3. double fallSpeed = 0.08,
  4. double sensibility = 8.0,
})

Implementation

AudioSpectrum({
  this.samplingRate = 44100,
  this.bandType = BandType.tenBand,
  this.fallSpeed = 0.08,
  this.sensibility = 8.0,
}) {
  rawSpectrum = List.filled(0, 0.0);
  int bandCount = kMiddleFrequenciesForBands[bandType.index].length;
  levels = List.filled(bandCount, 0.0);
  peakLevels = List.filled(bandCount, 0.0);
  meanLevels = List.filled(bandCount, 0.0);
}