Пример #1
0
        void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            float[] floatBuffer = bytesToFloats((byte[])e.Argument);

            if (yin != null)
            {
                setNumbers(yin.getPitch(floatBuffer).getPitch());
            }
            else if (ptracker != null)
            {
                ptracker.ProcessBuffer(floatBuffer);
            }
        }
Пример #2
0
        private void OnTimerTick(object sender, EventArgs e)     //every set period of time (i think this is set to 10ms but i may have two timers going on)
        {
            m_pitchTracker.ProcessBuffer(floatBuffer.ToArray()); // the buffer is passed through the pitchtrackers process class. This performs the calculations to determine the pitch etc

            UpdateDisplay();
        }