Skip to content

Commit 8b380f1

Browse files
committed
refactor(device::cache): use proper filter for the state
1 parent 64d5dd6 commit 8b380f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SoundSwitch/Framework/Audio/Lister/CachedAudioDeviceLister.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public DeviceReadOnlyCollection<DeviceFullInfo> GetDevices(DataFlow type, Device
4848
{
4949
return type switch
5050
{
51-
DataFlow.Render => new DeviceReadOnlyCollection<DeviceFullInfo>(PlaybackDevices.Where(info => _state.HasFlag(info.State)), type),
52-
DataFlow.Capture => new DeviceReadOnlyCollection<DeviceFullInfo>(RecordingDevices.Where(info => _state.HasFlag(info.State)), type),
51+
DataFlow.Render => new DeviceReadOnlyCollection<DeviceFullInfo>(PlaybackDevices.Where(info => state.HasFlag(info.State)), type),
52+
DataFlow.Capture => new DeviceReadOnlyCollection<DeviceFullInfo>(RecordingDevices.Where(info => state.HasFlag(info.State)), type),
5353
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
5454
};
5555
}

0 commit comments

Comments
 (0)