Skip to main content

odin_decoder_create_ex

enum OdinError odin_decoder_create_ex(uint16_t media_id,
uint32_t sample_rate,
bool stereo,
uint8_t base_jitter_packets,
struct OdinDecoder **out_decoder);

Overview

Creates a new instance of an ODIN decoder with extended configuration options. In addition to sample rate and channel layout, it allows customizing the jitter handling by specifying the number of packets to use in calculating the base jitter.

Parameters

NameTypeDescription
media_iduint16_tThe media ID to decode.
sample_rateuint32_tThe desired output sample rate.
stereoboolTrue for stereo output.
base_jitter_packetsuint8_tBase jitter in packet count (usually 20ms per packet).
out_decoderstruct OdinDecoder **Pointer to receive the new decoder handle.

Return Value

TypeDescription
OdinErrorODIN_ERROR_SUCCESS on success.