FVoiceJitterBuffer
- Module
- VoiceChat
- Header
#include "VoiceChat/FVoiceJitterBuffer.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
FVoiceJitterBuffer() = default | FVoiceJitterBuffer |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Configure | |
void | Reset | |
uint32_t | GetFrameSamples | |
uint32_t | GetTargetFrames | |
uint32_t | GetMaxFrames | |
size_t | GetQueuedFrames | |
bool | IsPrimed | |
bool | Push | Inserts one raw decoded frame at its sequence position. |
bool | PushPacket | Inserts one encoded packet, decoded later by Pop(decoder, ...). |
bool | Pop | Fills out with the next raw frame. |
bool | Pop | Decodes the next packet through decoder. |
const FVoiceJitterStats& | GetStats | |
void | ResetStats | |
int32_t | SequenceDelta | Sequence distance that treats the 16-bit counter as circular, so a wrap does not read as a 65000-frame jump backwards. |
Function details
FVoiceJitterBuffer
FVoiceJitterBuffer() = defaultConfigure
void Configure(uint32_t frameSamples, uint32_t targetFrames, uint32_t maxFrames)Reset
void Reset()GetFrameSamples
uint32_t GetFrameSamples() constGetTargetFrames
uint32_t GetTargetFrames() constGetMaxFrames
uint32_t GetMaxFrames() constGetQueuedFrames
size_t GetQueuedFrames() constIsPrimed
bool IsPrimed() constPush
bool Push(uint16_t sequence, const int16_t* samples, uint32_t sampleCount)Inserts one raw decoded frame at its sequence position. False when the frame was refused — a duplicate, a frame older than what has already played, or an overflow past maxFrames (the oldest is dropped to make room).
PushPacket
bool PushPacket(uint16_t sequence, const uint8_t* payload, size_t len)Inserts one encoded packet, decoded later by Pop(decoder, ...).
Pop
bool Pop(std::vector<int16_t>& out)Fills out with the next raw frame. True when a real frame was delivered, false when the buffer concealed (hole or starvation) — out is still filled in both cases, so the playback path never has to branch.
Pop
bool Pop(IVoiceDecoder& decoder, std::vector<int16_t>& out)Decodes the next packet through decoder. A hole is rebuilt from the packet after it (FEC for one frame, deep redundancy further back) when that packet is already here, and concealed by the decoder otherwise. True for a real or rebuilt frame, false for a concealed one.
GetStats
const FVoiceJitterStats& GetStats() constResetStats
void ResetStats()SequenceDelta
static int32_t SequenceDelta(uint16_t a, uint16_t b)Sequence distance that treats the 16-bit counter as circular, so a wrap does not read as a 65000-frame jump backwards.