Exemple #1
0
 public MuteResult GetCurrentMuteState()
 {
     return(GetAudioDevice.GetRecordingMute() switch
     {
         true => new MuteResult.Muted(),
         false => new MuteResult.Unmuted()
     });
Exemple #2
0
        public void Toggle()
        {
            var muteState = !GetAudioDevice.GetRecordingMute();

            var recordingDevices = GetAudioDevice.List().Where(device =>
                                                               string.Equals(device.Type, "Recording", StringComparison.InvariantCultureIgnoreCase)).ToArray();

            SetMuteStateForAllDevices(recordingDevices, muteState);
        }
 public SoundOutRepresenter(GetAudioDevice audioDeviceAction)
 {
     AudioDevices          = new ObservableCollection <AudioDevice>();
     _getAudioDeviceAction = audioDeviceAction;
 }
 public SoundOutRepresenter(GetAudioDevice audioDeviceAction)
 {
     AudioDevices = new ObservableCollection<AudioDevice>();
     _getAudioDeviceAction = audioDeviceAction;
 }