示例#1
0
 private static void UpdateWindowsDefault(ISoundOutMode soundOutMode)
 {
     if (soundOutMode.Devices.All(x => x.Id == WindowsDefaultId))
     {
         soundOutMode.Devices.Clear(); //No windows default if there aren't any devices
     }
     else if (soundOutMode.Devices.Count > 0 && soundOutMode.Devices.All(x => x.Id != WindowsDefaultId))
     {
         ((SoundOutMode)soundOutMode).AddWindowsDefaultDevice();
     }
 }
 private static void UpdateWindowsDefault(ISoundOutMode soundOutMode)
 {
     if (soundOutMode.Devices.All(x => x.Id == WindowsDefaultId))
     {
         soundOutMode.Devices.Clear(); //No windows default if there aren't any devices
     }
     else if (soundOutMode.Devices.Count > 0 && soundOutMode.Devices.All(x => x.Id != WindowsDefaultId))
     {
         ((SoundOutMode)soundOutMode).AddWindowsDefaultDevice();
     }
 }