Example #1
0
        private void Render()
        {
            if (fmod == null || fmod.IsInvalid
                || channel == null || !channel.IsPlaying
                )
                return;

            int spectrumSize = (int)Math.Pow(2,(double) numSpectrumDetail.Value);
            int waveSize = (int)numWaveDetail.Value;

            var spectrum = new float[spectrumSize];
            var wavedata = new float[waveSize];

            var result = new VisData();
            fmod.GetWaveData(wavedata, waveSize, 0);
            fmod.GetSpectrum(spectrum, spectrumSize, 0, FFTWindow.Max);
            result.WaveData = wavedata.ToList();
            result.SpectrumData = spectrum.ToList();

            picVisualisation.UpdateData(result);
        }
 internal void UpdateData(VisData result)
 {
     _data = result;
     Refresh();
 }