Exemplo n.º 1
0
 public void TearDown()
 {
     this.provider = null;
     this.source   = null;
     this.receiver = null;
     this.sender   = null;
     this.context  = null;
 }
Exemplo n.º 2
0
        public void SetModel(IAudioSender audioSource, IVideoSender videoSource)
        {
            DisconnectFromCall();

            _cameraAudio = audioSource;
            _cameraVideo = videoSource;

            ConnectToCall(Call);
        }
	    public void SetModel(IAudioSender audioSource, IVideoSender videoSource)
	    {
	        DisconnectFromCall();

	        _cameraAudio = audioSource;
            _cameraVideo = videoSource;

            ConnectToCall(Call);
	    }
Exemplo n.º 4
0
 public NetworkAudioSender(INetworkChatCodec codec, int inputDeviceNumber, IAudioSender audioSender)
 {
     this.codec                = codec;
     this.audioSender          = audioSender;
     waveIn                    = new WaveIn();
     waveIn.BufferMilliseconds = 50;
     waveIn.DeviceNumber       = inputDeviceNumber;
     waveIn.WaveFormat         = codec.RecordFormat;
     waveIn.DataAvailable     += OnAudioCaptured;
     waveIn.StartRecording();
 }
Exemplo n.º 5
0
        public void Setup()
        {
            this.provider = new MockAudioCaptureProvider();
            this.source   = AudioSourceTests.GetTestSource();

            var c = new MockConnectionProvider(GablarskiProtocol.Instance).GetClientConnection();

            var client = new MockClientContext(c);

            this.context  = client;
            this.sender   = new ClientSourceHandler(client, new ClientSourceManager(client));
            this.receiver = (IAudioReceiver)this.sender;
        }
Exemplo n.º 6
0
        public NetworkAudioSender(INetworkChatCodec codec, int inputDeviceNumber, IAudioSender audioSender)
        {
            Codec       = codec;
            AudioSender = audioSender;

            WaveIn = new WaveInEvent
            {
                BufferMilliseconds = 50, DeviceNumber = inputDeviceNumber, WaveFormat = codec.RecordFormat
            };

            WaveIn.DataAvailable += OnAudioCaptured;
            WaveIn.StartRecording();
        }
Exemplo n.º 7
0
        public NetworkAudioSender(INetworkChatCodec codec, int inputDeviceNumber, IAudioSender audioSender)
        {
            var devices = new MMDeviceEnumerator().EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.Active).ToList();

            this.codec       = codec;
            this.audioSender = audioSender;
            //waveIn = new WasapiCapture(devices[0], true, 1);
            waveIn = new WaveInEvent();
            waveIn.BufferMilliseconds = 50;
            waveIn.DeviceNumber       = inputDeviceNumber;
            waveIn.WaveFormat         = codec.RecordFormat;
            waveIn.DataAvailable     += OnAudioCaptured;
            waveIn.StartRecording();
        }
Exemplo n.º 8
0
 public void TearDown()
 {
     this.provider = null;
     this.source = null;
     this.receiver = null;
     this.sender = null;
     this.context = null;
 }
Exemplo n.º 9
0
        public void Setup()
        {
            this.provider = new MockAudioCaptureProvider();
            this.source = AudioSourceTests.GetTestSource();

            var c = new MockConnectionProvider (GablarskiProtocol.Instance).GetClientConnection();

            var client = new MockClientContext (c);
            this.context = client;
            this.sender = new ClientSourceHandler (client, new ClientSourceManager (client));
            this.receiver = (IAudioReceiver)this.sender;
        }
Exemplo n.º 10
0
 private void Send()
 {
     AudioSender        = new UdpAudioSender(IpAddress);
     NetworkAudioSender = new NetworkAudioSender(new ALawChatCodec(), 0, AudioSender);
 }
 public void Connect(IAudioSender audioSender, IVideoSender videoSender)
 {
     _connector.Connect(audioSender, _audioSender);
     _connector.Connect(videoSender, _videoSender);
 }
Exemplo n.º 12
0
 public void Connect(IAudioSender audioSender, IVideoSender videoSender)
 {
     _connector.Connect(audioSender, _audioSender);
     _connector.Connect(videoSender, _videoSender);
 }