public int GetAudioDeviceId(string name) { int count = PJSIPInterop.sua_get_aud_devs_count(); for (uint i = 0; i < count; i++) { media_aud_dev_info dev = new media_aud_dev_info(); PJSIPInterop.sua_get_aud_devs(i, ref dev); if (dev.name == name) { return((int)i); } } return(-1); }
public List <Device> GetAudioDevices() { List <Device> devices = new List <Device>(); int count = PJSIPInterop.sua_get_aud_devs_count(); for (uint i = 0; i < count; i++) { media_aud_dev_info dev = new media_aud_dev_info(); PJSIPInterop.sua_get_aud_devs(i, ref dev); Device device = new Device(); device.Id = i; device.Name = dev.name; device.InputCount = dev.input_count; device.OutputCount = dev.output_count; devices.Add(device); } return(devices); }