ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
opus_codec_t Struct Reference

State for one Opus encoding or decoding direction. More...

#include <include/ascii-chat/audio/opus.h>

Data Fields

OpusEncoder * encoder
 Encoder state (NULL if decoder).
OpusDecoder * decoder
 Decoder state (NULL if encoder).
int sample_rate
 Sample rate in Hz (e.g., 44100).
int channels
 PCM channels (1 or 2); sample counts include all channels.
int bitrate
 Bitrate in bits per second (encoder only).
uint8_t * tmp_buffer
 Temporary buffer for internal use.

Detailed Description

State for one Opus encoding or decoding direction.

Exactly one of encoder and decoder is normally populated. The remaining fields record the PCM format and encoder bitrate, while tmp_buffer is scratch storage used during conversion. Create and destroy this object with the codec API; callers should not manipulate the libopus handles directly.

Note
This is an opaque type. Do not access fields directly.

Definition at line 105 of file opus.h.

Field Documentation

◆ bitrate

int opus_codec_t::bitrate

Bitrate in bits per second (encoder only).

Definition at line 110 of file opus.h.

Referenced by opus_codec_create_decoder_channels(), opus_codec_create_encoder_channels(), opus_codec_encode(), and opus_codec_set_bitrate().

◆ channels

int opus_codec_t::channels

PCM channels (1 or 2); sample counts include all channels.

Definition at line 109 of file opus.h.

Referenced by opus_codec_create_decoder_channels(), opus_codec_create_encoder_channels(), opus_codec_decode(), and opus_codec_encode().

◆ decoder

OpusDecoder* opus_codec_t::decoder

Decoder state (NULL if encoder).

Definition at line 107 of file opus.h.

Referenced by opus_codec_create_decoder_channels(), opus_codec_create_encoder_channels(), opus_codec_decode(), and opus_codec_destroy().

◆ encoder

◆ sample_rate

int opus_codec_t::sample_rate

Sample rate in Hz (e.g., 44100).

Definition at line 108 of file opus.h.

Referenced by opus_codec_create_decoder_channels(), opus_codec_create_encoder_channels(), opus_codec_decode(), and opus_codec_encode().

◆ tmp_buffer

uint8_t* opus_codec_t::tmp_buffer

Temporary buffer for internal use.

Definition at line 111 of file opus.h.

Referenced by opus_codec_create_decoder_channels(), opus_codec_create_encoder_channels(), and opus_codec_destroy().


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