public ChatMember(IChatUnit chatUnit)
 {
     this.chatUnit = chatUnit;
     //this.chatUnit.MicrophoneConnector.ConnectEnded += ;
     this.chatUnit.MicrophoneConnector.OwnerOutputChanged += () => { OwnerOutputChanged?.Invoke(this.chatUnit.MicrophoneConnector.OwnerOutput); };
     this.chatUnit.MicrophoneConnector.AudioDataReceived  += a => { AudioDataReceived?.Invoke(a); };
     //开始连接到目标成员的麦克风设备
     this.chatUnit.MicrophoneConnector.BeginConnect(chatUnit.MemberID);
 }
示例#2
0
        private void NotifyAudio(int numChannels)
        {
            var audioData = _currentAudioData;

            if (audioData != null && (audioData.dBFS.Any(v => v != null) || audioData.pFS.Any(v => v != null)))
            {
                AudioDataReceived?.Invoke(this, new AudioDataEventArgs(audioData));
            }
            _currentAudioData = new AudioData(numChannels);
        }