Vixen
02b45cc4
csharp
public readonly record struct VoicePacketHeader

What a voice packet carries besides its bytes.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Two counters, because one cannot answer the question that matters. A receiver needs to distinguish a packet that was lost from a packet that was deliberately not sent — the sender's gate was shut and nobody was talking. Concealing a loss is right; concealing a silence invents speech into a pause, and sounds like the talker stuttering.

Sequence counts what left the sender, so a gap in it is loss. Timestamp counts the talker's clock, so a gap in it with no gap in sequence is silence. This is what RTP does, for exactly this reason, and no simpler scheme distinguishes the two cases.

Fields and properties (2)

  • public ushort Sequence

    Which transmitted packet this is. Increments by one every time something is sent.

  • public uint Timestamp

    Which frame of the talker's timeline it starts at. Advances by a frame length per elapsed frame.

Methods (1)

  • public VoicePacketHeader(ushort Sequence, uint Timestamp)

    What a voice packet carries besides its bytes.

Used by (5)

  • PeerVoiceChat
  • VoiceLinkVoiceChat
  • VoiceReceiverVixen.Audio.Codecs
  • VoiceSenderVixen.Audio.Codecs
  • VoiceTestsVixen.Audio.Codecs.Tests