void FftCalculated(object sender, FftEventArgs e) { // Do something with e.result! //Global.logger.LogLine($"{e.Result.ToString()}"); _ffts_prev = new List <Complex>(_ffts).ToArray(); _ffts = new List <Complex>(e.Result).ToArray(); }
public SampleAggregator(int fftLength) { if (!IsPowerOfTwo(fftLength)) { throw new ArgumentException("FFT Length must be a power of two"); } this.m = (int)Math.Log(fftLength, 2.0); this.fftLength = fftLength; this.fftBuffer = new Complex[fftLength]; this.fftArgs = new FftEventArgs(fftBuffer); }