From d695d2d38acb86f626db78afce19a0be869f6834 Mon Sep 17 00:00:00 2001 From: Antoine Aflalo Date: Tue, 2 Apr 2024 13:16:58 -0400 Subject: [PATCH] fix: getting all device that have name --- SoundSwitch.Audio.Manager/AudioSwitcher.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SoundSwitch.Audio.Manager/AudioSwitcher.cs b/SoundSwitch.Audio.Manager/AudioSwitcher.cs index 5d506f9fab..a8a95e138b 100644 --- a/SoundSwitch.Audio.Manager/AudioSwitcher.cs +++ b/SoundSwitch.Audio.Manager/AudioSwitcher.cs @@ -332,8 +332,9 @@ public IEnumerable GetAudioEndpoints(EDataFlow flow, EDeviceStat Trace.TraceError("Couldn't get device info: {0}", e); return null; } - }).Where(device => device != null) - .Where(device => string.IsNullOrEmpty(device?.Name)) + }) + .Where(device => device != null) + .Where(device => !string.IsNullOrEmpty(device?.Name)) .Cast().ToArray(); });