title: Detecting input and output audio devices separately in C#
body: <p>I am trying to search for all available sound input and outut devices and adding their names into a <code>ComboBox</code>.
  I am using this code (found here at stackoverflow in a similiar question):</p>
  
  <pre><code>ManagementObjectSearcher mo = new ManagementObjectSearcher("select * from Win32_SoundDevice");
  
  foreach (ManagementObject soundDevice in mo.Get())
  {
      string deviceId = soundDevice.GetPropertyValue("DeviceId").ToString();
      string name = soundDevice.GetPropertyValue("Name").ToString();
  
      comboBox1.Items.Add(name);
  }
  </code></pre>
  
  <p>But this seems to select all available devices, I need to separate input devices and output devices. Is there a simple way of editing this code, or is there a more sophisticated method needed?</p>