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); }
void audioGraph_FftCalculated(object sender, FftEventArgs e) { //Dispatcher.BeginInvoke(new Action<object, FftEventArgs>((s, args) => //{ // //if (this.selectedVisualization != null) // //{ // // this.selectedVisualization.OnFftCalculated(e.Result); // //} // //spectrumAnalyser.Update(e.Result); //}), sender, e); }