public void OnSelectedInputChanged()
        {
            var devNumber = InputSources.IndexOf(SelectedInput.Value);

            DataMaster.Setting.DevNumber = devNumber;
            DataMaster.Setting.MicChanel = SelectedInput.Value.Channels;
        }
        public void OnSelectedInputChanged()
        {
            var devNumber = InputSources.IndexOf(SelectedInput.Value);

            DataMaster.Setting.DevNumber = devNumber;
            DataMaster.Setting.MicChanel = SelectedInput.Value.Channels;

            ReleaseResource();

            try
            {
                _inputStream = new WaveIn
                {
                    DeviceNumber = devNumber,
                    WaveFormat   = new WaveFormat(44100, SelectedInput.Value.Channels)
                };
                _inputStream.DataAvailable += InputStreamOnDataAvailable;
                _waveWriter = new WaveFileWriter("sample.wav", _inputStream.WaveFormat);
                _inputStream.StartRecording();
            }
            catch (Exception)
            {
                OpenMicFailedPage();
            }
        }