public MuteResult GetCurrentMuteState() { return(GetAudioDevice.GetRecordingMute() switch { true => new MuteResult.Muted(), false => new MuteResult.Unmuted() });
public void Toggle() { var muteState = !GetAudioDevice.GetRecordingMute(); var recordingDevices = GetAudioDevice.List().Where(device => string.Equals(device.Type, "Recording", StringComparison.InvariantCultureIgnoreCase)).ToArray(); SetMuteStateForAllDevices(recordingDevices, muteState); }