/// <summary> /// Gets the device description string matching the given device handle and the given type. /// </summary> /// <returns>The device string.</returns> /// <param name="handle">Handle.</param> /// <param name="type">Type.</param> static string GetDeviceString(DeviceHandle handle, DeviceStringType type) { if (handle.IsValid) { var p = MusicManager.GetPlugins(); foreach (var m in p) { var devices = m.GetDevices(); foreach (var d in devices) { if (Equals(handle, d.Handle)) { if (type == DeviceStringType.DriverName) { return(d.MusicDriverName); } else if (type == DeviceStringType.DriverId) { return(d.MusicDriverId); } else if (type == DeviceStringType.DeviceName) { return(d.CompleteName); } else if (type == DeviceStringType.DeviceId) { return(d.CompleteId); } else { return("auto"); } } } } } return("auto"); }
/// <summary> /// Gets the device description string matching the given device handle and the given type. /// </summary> /// <returns>The device string.</returns> /// <param name="handle">Handle.</param> /// <param name="type">Type.</param> static string GetDeviceString(DeviceHandle handle, DeviceStringType type) { if (handle.IsValid) { var p = MusicManager.GetPlugins(); foreach (var m in p) { var devices = m.GetDevices(); foreach (var d in devices) { if (Equals(handle, d.Handle)) { if (type == DeviceStringType.DriverName) return d.MusicDriverName; else if (type == DeviceStringType.DriverId) return d.MusicDriverId; else if (type == DeviceStringType.DeviceName) return d.CompleteName; else if (type == DeviceStringType.DeviceId) return d.CompleteId; else return "auto"; } } } } return "auto"; }