Example #1
0
        private void FillAudioFormats()
        {
            int         nCount = 0;
            int         nIndex;
            string      strFormat;
            M_AUD_PROPS audProps;

            comboBoxAF.Items.Clear();
            m_objFile.FormatAudioGetCount(eMFormatType.eMFT_Convert, out nCount);
            comboBoxAF.Enabled = nCount > 0;
            if (nCount > 0)
            {
                for (int i = 0; i < nCount; i++)
                {
                    m_objFile.FormatAudioGetByIndex(eMFormatType.eMFT_Convert, i, out audProps, out strFormat);
                    if (audProps.nBitsPerSample == 16 && audProps.nChannels == 16 && audProps.nSamplesPerSec == 48000)
                    {
                        startAudioFormat = i;
                    }
                    comboBoxAF.Items.Add(strFormat);
                }
                m_objFile.FormatAudioGet(eMFormatType.eMFT_Convert, out audProps, out nIndex, out strFormat);
                if (nIndex > 0)
                {
                    comboBoxAF.SelectedIndex = nIndex;
                }
                else
                {
                    comboBoxAF.SelectedIndex = 0;
                }
            }
        }