public bool Equals(AudioSourceInfo info)
        {
            if (info == null)
                return false;

            return (Name == info.Name)
                && (Channels == info.Channels)
                && (DeviceNumber == info.DeviceNumber);
        }
        public void RetrieveApplicationSettings()
        {
            Sources.Clear();

            for (int i = 0; i < WaveIn.DeviceCount; ++i)
            {
                var capabilities = WaveIn.GetCapabilities(i);
                var audioSource = new AudioSourceInfo(capabilities, i);
                if (!Sources.Contains(audioSource))
                    Sources.Add(audioSource);
            }

            if (Settings.Default.Microphone != null)
                SelectedAudioSource = Sources.FirstOrDefault(audioSourceInfo =>
                    audioSourceInfo.Name == Settings.Default.Microphone.Name);

            if (SelectedAudioSource == null && 0 < Sources.Count)
                SelectedAudioSource = Sources[0];
            else if (Sources.Count <= 0)
                SelectedAudioSource = null;
        }