示例#1
0
        public VoiceSettings(VoiceService voices)
        {
            InitializeComponent();

            Voices = voices;

            // recording
            for (int i = 0; i < WinMM.waveInGetNumDevs(); i++)
            {
                WinMM.WaveInCaps device = new WinMM.WaveInCaps();

                WinMM.ErrorCheck(WinMM.waveInGetDevCaps(i, ref device, Marshal.SizeOf(device)));

                DeviceInCombo.Items.Add(device.szPname);
            }

            DeviceInCombo.SelectedIndex = 0;

            // playback
            for (int i = 0; i < WinMM.waveOutGetNumDevs(); i++)
            {
                WinMM.WaveOutCaps device = new WinMM.WaveOutCaps();

                WinMM.ErrorCheck(WinMM.waveOutGetDevCaps(i, ref device, Marshal.SizeOf(device)));

                DeviceOutCombo.Items.Add(device.szPname);
            }

            DeviceOutCombo.SelectedIndex = 0;
        }
示例#2
0
        public VoiceSettings(VoiceService voices)
        {
            InitializeComponent();

            Voices = voices;

            // recording
            for (int i = 0; i < WinMM.waveInGetNumDevs(); i++)
            {
                WinMM.WaveInCaps device = new WinMM.WaveInCaps();

                WinMM.ErrorCheck(WinMM.waveInGetDevCaps(i, ref device, Marshal.SizeOf(device)));

                DeviceInCombo.Items.Add(device.szPname);
            }

            DeviceInCombo.SelectedIndex = 0;

            // playback
            for (int i = 0; i < WinMM.waveOutGetNumDevs(); i++)
            {
                WinMM.WaveOutCaps device = new WinMM.WaveOutCaps();

                WinMM.ErrorCheck(WinMM.waveOutGetDevCaps(i, ref device, Marshal.SizeOf(device)));

                DeviceOutCombo.Items.Add(device.szPname);

            }

            DeviceOutCombo.SelectedIndex = 0;
        }