/// <summary>
        /// Initializes a new thread to be used for constantly listening to the microphone input.
        /// </summary>
        /// <returns>The thread which the microphone listener is running on.</returns>
        protected Thread CreateMicrophoneRecorder()
        {
            //Microphone initialization;
            micManager = new MicrophoneManager();
            micManager.FinishedSampling += OnMicrophoneFinishedSamplingEvent;

            //Crate new thread for constantly listening to the microphone input.
            Thread thread = new Thread(new ThreadStart(() =>
            {
                //Initialize microphone recorder.
                micManager.RecorderInit();
                //Listen constantly, untill a further notice.
                while (shouldListen)
                {
                    micManager.Listen();
                }
            }));

            return(thread);
        }
        /// <summary>
        /// Initializes a new thread to be used for constantly listening to the microphone input.
        /// </summary>
        /// <returns>The thread which the microphone listener is running on.</returns>
        protected Thread CreateMicrophoneRecorder()
        {
            //Microphone initialization;
            micManager = new MicrophoneManager();
            micManager.FinishedSampling += OnMicrophoneFinishedSamplingEvent;

            //Crate new thread for constantly listening to the microphone input.
            Thread thread = new Thread(new ThreadStart(() =>
            {
                //Initialize microphone recorder.
                micManager.RecorderInit();
                //Listen constantly, untill a further notice.
                while (shouldListen)
                {
                    micManager.Listen();
                }
            }));

            return thread;
        }