private void func(object sender, FftEventArgs e) { foreach (var item in e.Result) { //Console.WriteLine(item.X); //Console.WriteLine(item.Y); chart1.Series["X"].Points.Add(item.X); chart1.Series["Y"].Points.Add(item.Y); } }
public SampleAggregator(int fftLength = 1024) { 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); }