public VoiceTest()
        {
            InitializeComponent();

            // Configure the wavechart
            TestWaveChart.SimpleMode = true;
            TestWaveChart.AddWaveform("wave", Color.Maroon, 1, false);
            updateButtons();
        }
        //=============================================================================================================================//

        //Given
        private void updateWaveform(float[] samples, int length)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new Action(() =>
                {
                    TestWaveChart.UpdateWaveform("wave", samples, length);
                }));
            }
            else
            {
                if (this.encoder != null)
                {
                    TestWaveChart.UpdateWaveform("wave", this.encoder.current, length);
                }
            }
        }