예제 #1
0
        //private void SmoothDataAcross

        private TimeSpectrumData GetTimeSpectrumData()
        {
            var fftBuffer = new float[(int)Spectrum.FftSize];

            if (!Spectrum.SpectrumProvider.GetFftData(fftBuffer, this))
            {
                throw new Exception("idk wtf happened");
            }

            var data = Spectrum.CalculateSpectrumPoints(1000000, fftBuffer).Select(x => x.Value);

            return(new TimeSpectrumData
            {
                SpectrumData = data.ToArray(),
                Time = NotificationStream.GetMilliseconds(NotificationStream.Position)
            });
        }