Пример #1
0
        private void Test_Click(object sender, EventArgs e)
        {
            var afr = new AudioFileReader();

            try
            {
                afr.Open(cmbFFMPEGURL.Text);
                afr.ReadAudioFrame();

                Mic.settings.channels = afr.Channels;
                Mic.settings.samples  = afr.SampleRate;
                Mic.settings.bits     = 16;

                MessageBox.Show("OK");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            try
            {
                afr.Close();
            }
            catch
            {
            }
            afr = null;
        }
Пример #2
0
        private void Test_Click(object sender, EventArgs e)
        {
            var afr = new AudioFileReader();

            try
            {
                afr.Open(cmbFFMPEGURL.Text);
                afr.ReadAudioFrame();

                Mic.settings.channels = afr.Channels;
                Mic.settings.samples = afr.SampleRate;
                Mic.settings.bits = 16;

                MessageBox.Show("OK");

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            try
            {
                afr.Close();
            }
            catch
            {

            }
            afr = null;
        }