private void OnCaptured(bool recover, IAudioPacket packet) { byte[] uncompressed; if (recover) { uncompressed = _codec.Restore(packet?.Payload ?? null); } else { uncompressed = _codec.Decode(packet.Payload); } _waveProvider.AddSamples(uncompressed, 0, uncompressed.Length); }
private void OnProviderReceived(IPEndPoint remote, IAudioPacket packet) { if (remote == null || !_routes.Contains(remote)) { return; } foreach (var route in _routes.ToArray()) { if (remote.Equals(route)) { continue; } _provider.Send(route, packet); } }
public void Handle(IAudioPacket packet) { _buffer.Enqueue(packet); }
public void Send(IPEndPoint target, IAudioPacket packet) { _network.Send(target, packet.Pack()); }
public void Enqueue(IAudioPacket packet) { _jitter.Append(packet); }
public void Send(IAudioPacket packet) { _transport.Send(packet.Pack()); }