IoT SDK for Linux v1.9.7
Loading...
Searching...
No Matches
audio_codec_option_t Struct Reference

#include <agora_rtc_api.h>

Data Fields

audio_codec_type_e audio_codec_type
int pcm_sample_rate
int pcm_channel_num
int pcm_duration

Detailed Description

The SDK's built-in audio codec settings.

Field Documentation

◆ audio_codec_type

audio_codec_type_e audio_codec_type

Configures the SDK's built-in audio codec. See audio_codec_type_e. If AUDIO_CODEC_TYPE_OPUS is selected, your PCM data is encoded as OPUS and then streamed to Agora channel If AUDIO_CODEC_TYPE_G722 is selected, your PCM data is encoded as G722 and then streamed to Agora channel If you provide encoded audio data, such as AAC, instead of raw PCM, please disable audio codec by selecting AUDIO_CODEC_DISABLED

◆ pcm_channel_num

int pcm_channel_num

The number of PCM channels used by the built-in audio codec. This parameter is required and supports the following values:

  • 1: Mono.
  • 2: Stereo.

◆ pcm_duration

int pcm_duration

The audio duration in milliseconds. The value must be a multiple of 10 in the range [20, 100]. This setting applies to audio data in every format.

◆ pcm_sample_rate

int pcm_sample_rate

The PCM sample rate (Hz) used by the built-in audio codec. This parameter is required and supports the following values:

  • 8000: 8 kHz.
  • 16000: 16 kHz.
  • 48000: 48 kHz.

The documentation for this struct was generated from the following file: