コード例 #1
0
 public void AddLocalMicrophone(LocalMicrophoneModel mic)
 {
     if (LocalMicrophones.FirstOrDefault(x => x.Id == mic.Id) == null)
     {
         System.Windows.Application.Current.Dispatcher.Invoke(() => { LocalMicrophones.Add(mic); });
         Log.Info(string.Format("Added local microphone: name={0} id={1}", mic.DisplayName, mic.Id));
     }
 }
コード例 #2
0
        private void ShareAudioContent()
        {
            var contentToShare = LocalMicrophones.FirstOrDefault(x => x.IsSharingContent);

            if (contentToShare != null)
            {
                _connector.SelectAudioContentShare(contentToShare.Object);
                Log.InfoFormat("Set selected audio content sharing: name={0} id={1}", contentToShare.DisplayName,
                               contentToShare.Id);
            }
        }
コード例 #3
0
        private void SelectLocalMicrophone()
        {
            var micToSelect = LocalMicrophones.FirstOrDefault(x => x.IsStreamingAudio);

            if (micToSelect != null)
            {
                _connector.SelectLocalMicrophone(micToSelect.Object);
                Log.Info(string.Format("Set selected local microphone: name={0} id={1}", micToSelect.DisplayName,
                                       micToSelect.Id));
            }
        }
コード例 #4
0
        public void RemoveLocalMicrophone(LocalMicrophoneModel mic)
        {
            var micToRemove = LocalMicrophones.FirstOrDefault(x => x.Id == mic.Id);

            if (micToRemove != null)
            {
                System.Windows.Application.Current.Dispatcher.Invoke(() => { LocalMicrophones.Remove(micToRemove); });
                Log.Info(string.Format("Removed local microphone: name={0} id={1}", micToRemove.DisplayName,
                                       micToRemove.Id));
            }
        }
コード例 #5
0
        public void SetSelectedAudioContent(LocalMicrophoneModel mic)
        {
            var micToSelect = LocalMicrophones.FirstOrDefault(x => x.Id == mic.Id);

            if (micToSelect != null)
            {
                LocalMicrophones.Select(x =>
                {
                    x.IsSharingContent = false;
                    return(x);
                })
                .ToList();
                micToSelect.IsSharingContent = true;

                Log.InfoFormat("Audio content share selected: name={0} id={1}", micToSelect.DisplayName, micToSelect.IsSharingContent);
            }
        }
コード例 #6
0
        public void SetSelectedLocalMicrophone(LocalMicrophoneModel mic)
        {
            var micToSelect = LocalMicrophones.FirstOrDefault(x => x.Id == mic.Id);

            if (micToSelect != null)
            {
                LocalMicrophones.Select(x =>
                {
                    x.IsStreamingAudio = false;
                    return(x);
                })
                .ToList();
                micToSelect.IsStreamingAudio = true;

                Log.Info(string.Format("Local microphone selected: name={0} id={1}", micToSelect.DisplayName,
                                       micToSelect.Id));
            }
        }