Example #1
0
        private void cmbWmvAudioCodecs_SelectedIndexChanged(object sender, EventArgs e)
        {
            _tempCapturer.CurrentWMVAudioCodecName = cmbWmvAudioCodecs.SelectedItem.ToString();

            cmbWmvAudioFormats.Items.Clear();

            // Get list of available WMV audio formats
            for (int i = 0; i < _tempCapturer.WMVAudioFormatCount; i++)
            {
                string codec = _tempCapturer.GetWMVAudioFormatDescription(i);
                cmbWmvAudioFormats.Items.Add(codec);
            }

            for (int i = 0; i < cmbWmvAudioFormats.Items.Count; i++)
            {
                if (i == Program.Cfg.WmvAudioFormat)
                {
                    cmbWmvAudioFormats.SelectedIndex = i;
                    break;
                }
            }

            if (cmbWmvAudioFormats.SelectedIndex == -1)
            {
                cmbWmvAudioFormats.SelectedIndex = _tempCapturer.CurrentWMVAudioFormat;
                Program.Cfg.WmvAudioFormat       = _tempCapturer.CurrentWMVAudioFormat;
            }
        }
        private void cmbWmvAudioCodecs_SelectedIndexChanged(object sender, EventArgs e)
        {
            capturer.CurrentWMVAudioCodecName = cmbWmvAudioCodecs.SelectedItem.ToString();

            cmbWmvAudioFormats.Items.Clear();

            // Get list of available WMV audio formats
            for (int i = 0; i < capturer.WMVAudioFormatCount; i++)
            {
                string codec = capturer.GetWMVAudioFormatDescription(i);
                cmbWmvAudioFormats.Items.Add(codec);
            }

            // Select current WMV audio format
            cmbWmvAudioFormats.SelectedIndex = capturer.CurrentWMVAudioFormat;
        }