Skip to main content

odin_encoder_create_ex

enum OdinError odin_encoder_create_ex(uint32_t sample_rate,
bool stereo,
bool application_voip,
uint32_t bitrate_kbps,
uint8_t packet_loss_perc,
struct OdinEncoder **out_encoder);

Overview

Creates a new ODIN encoder instance for local media streams with extended codec configuration parameters.

Parameters

NameTypeDescription
sample_rateuint32_tThe sample rate of the input audio.
stereoboolTrue for stereo input.
application_voipboolTrue to optimize for VoIP, false for generic audio.
bitrate_kbpsuint32_tTarget bitrate in kbps.
packet_loss_percuint8_tExpected packet loss percentage (0-100).
out_encoderstruct OdinEncoder **Pointer to receive the new encoder handle.

Return Value

TypeDescription
OdinErrorODIN_ERROR_SUCCESS on success.