class

IVoiceDecoder

One speaker's decoding state. A stateful codec (Opus predicts each frame from the ones before it) needs a decoder per stream: a single decoder fed several speakers interleaved predicts every frame from someone else's voice, which degrades audibly from the third player on and leaves loss recovery with nothing coherent to recover from. Frames must reach it in sequence order, which is why the jitter buffer holds packets and decodes at playout.

Module
VoiceChat
Header
#include "VoiceChat/IVoiceCodec.h"
Namespace
Mowo

Constructors

SignatureNameDescription
virtual ~IVoiceDecoder() = default~IVoiceDecoder

Public functions

ReturnsNameDescription
boolDecodeDecodes one payload into exactly the codec's frame size.
boolDecodeFecRebuilds the frame immediately BEFORE nextPacket from its inband FEC.
boolDecodeRedundancyRebuilds the frame framesBack frames before packet from its deep redundancy (Opus DRED).
boolConcealSynthesises a frame for a hole nothing covers (packet-loss concealment that continues the decoder's own signal).

Function details

~IVoiceDecoder

C++
virtual ~IVoiceDecoder() = default

Decode

C++
virtual bool Decode(const uint8_t* data, size_t len, std::vector<int16_t>& out) = 0

Decodes one payload into exactly the codec's frame size.

DecodeFec

C++
virtual bool DecodeFec(const uint8_t* nextPacket, size_t len, std::vector<int16_t>& out)

Rebuilds the frame immediately BEFORE nextPacket from its inband FEC.

DecodeRedundancy

C++
virtual bool DecodeRedundancy(const uint8_t* packet, size_t len, uint32_t framesBack, std::vector<int16_t>& out)

Rebuilds the frame framesBack frames before packet from its deep redundancy (Opus DRED). False when the packet carries none, or not that far back.

Conceal

C++
virtual bool Conceal(std::vector<int16_t>& out)

Synthesises a frame for a hole nothing covers (packet-loss concealment that continues the decoder's own signal). False when the codec has none and the caller should fall back to its own concealment.

Generated from VoiceChat/IVoiceCodec.h via voicechat.json · Oct 26, 2026Version 1.0.0