/// <summary> /// get device id /// </summary> /// <param name="deviceToPlayOn">Index from list</param> /// <returns>device id</returns> public string getOutPutGuid(int deviceToPlayOn) { var collection = new AudioDeviceCollection(AudioDeviceCategory.Output).ToList(); collection.RemoveAt(0); return(collection[deviceToPlayOn].Guid.ToString()); }
/// <summary> /// get Index for list /// </summary> /// <param name="Guid">device id</param> /// <returns>Index from list</returns> public int getOutPut(string Guid) { var collection = new AudioDeviceCollection(AudioDeviceCategory.Output).ToList(); collection.RemoveAt(0); return(collection.FindIndex(device => device.Guid.ToString() == Guid)); }