private void comboBoxV_SelectedIndexChanged(object sender, EventArgs e) { try { comboBoxVF.Items.Clear(); comboBoxVideoLine.Items.Clear(); M_VID_PROPS vidProps; m_objLive.DeviceSet(eMFDeviceType.eMFDT_Video, comboBoxV.SelectedIndex, ""); RefreshProps(); buttonInit.Enabled = true; buttonCloseDev.Enabled = true; int nCount; string strName; // Fill video formats m_objLive.FormatVideoGetCount(eMFormatType.eMFT_Input, out nCount); if (nCount > 0) { for (int i = 0; i < nCount; i++) { m_objLive.FormatVideoGetByIndex(eMFormatType.eMFT_Input, i, out vidProps, out strName); comboBoxVF.Items.Add(strName); } // Get current format int nCurrent = 0; try { string strName_; M_VID_PROPS _vidProps; m_objLive.FormatVideoGet(eMFormatType.eMFT_Input, out _vidProps, out nCurrent, out strName_); } catch (System.Exception) { } // Select current comboBoxVF.SelectedIndex = nCurrent >= 0 ? nCurrent : 0; } // Fill audio formats comboBoxAF.Items.Clear(); nCount = 0; m_objLive.FormatAudioGetCount(eMFormatType.eMFT_Input, out nCount); if (nCount > 0) { M_AUD_PROPS audProps; for (int i = 0; i < nCount; i++) { m_objLive.FormatAudioGetByIndex(eMFormatType.eMFT_Input, i, out audProps, out strName); comboBoxAF.Items.Add(strName); } // Get current format int nCurrent = 0; try { string strName_; M_AUD_PROPS _audProps; m_objLive.FormatAudioGet(eMFormatType.eMFT_Input, out _audProps, out nCurrent, out strName_); } catch (System.Exception) { } // Select current comboBoxAF.SelectedIndex = nCurrent >= 0 ? nCurrent : 0; } CheckLineIn(); FillCombo(eMFDeviceType.eMFDT_Audio, comboBoxAudio); FillCombo(eMFDeviceType.eMFDT_ExtAudio, comboBoxAudioEx); FillCombo(eMFDeviceType.eMFDT_ExtAudio_2, comboBoxAudioEx2); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }