示例#1
0
        //main logic
        private static void TimerTick(object sender, EventArgs e)
        {
            //initialize after elements have loaded
            if (!m_HasInit)
            {
                //init spectrogram
                int spectrogramWidth  = (int)Instance.SpectrogramPanel.ActualWidth * 2;
                int spectrogramHeight = (int)Instance.SpectrogramGrid.ActualHeight * 2;
                m_Spectrogram = new Spectrogram(spectrogramWidth, spectrogramHeight, m_SpectrogramMultiplier);

                int waveformWidth  = (int)Instance.WaveformPanel.ActualWidth * 2;
                int waveformHeight = (int)Instance.WaveformPanel.ActualHeight * 2;
                m_Waveform = new Waveform(waveformWidth, waveformHeight, m_WaveformMultiplier);

                Mixer.SetUnusedChannels();

                m_HasInit = true;
            }

            Analyzer.ProcessBarValues();
            Mixer.ProcessLevels();

            Instance.SpectrogramBitmap.Fill = m_Spectrogram.CreateBitmap();
            Instance.WaveformBitmap.Fill    = m_Waveform.CreateBitmap();
        }