opus_custom.h(3)
β¨ NAME β¨
opus_custom.h β the Opus-Custom reference implementation API, bestie π (it's a section 3 manual page, from the Opus crew, and yes we're doing this whole thing together π«Ά)
πΈ SYNOPSIS πΈ
#include 'opus_defines.h'
π Macros π
#define OPUS_CUSTOM_EXPORT#define OPUS_CUSTOM_EXPORT_STATIC
π¦ Typedefs π¦
typedef struct OpusCustomEncoder OpusCustomEncoderβ this one's holding the whole state of an encoder, like its little diary πtypedef struct OpusCustomDecoder OpusCustomDecoderβ the state of the decoder, no captypedef struct OpusCustomMode OpusCustomModeβ the mode has all the info you need to create an encoder. main character struct energy π
π Functions π
OpusCustomMode * opus_custom_mode_create (opus_int32 Fs, int frame_size, int *error)β makes you a brand new mode struct β¨void opus_custom_mode_destroy (OpusCustomMode *mode)β yeets a mode struct into the voidint opus_custom_encoder_get_size (const OpusCustomMode *mode, int channels)β tells you how big anOpusCustomEncoderstruct is gonna beOpusCustomEncoder * opus_custom_encoder_create (const OpusCustomMode *mode, int channels, int *error)β spins up a fresh encoder state, slayvoid opus_custom_encoder_destroy (OpusCustomEncoder *st)β destroys an encoder state, rip πͺ¦int opus_custom_encode_float (OpusCustomEncoder *st, const float *pcm, int frame_size, unsigned char *compressed, int maxCompressedBytes)β encodes one frame of audio (float edition)int opus_custom_encode (OpusCustomEncoder *st, const opus_int16 *pcm, int frame_size, unsigned char *compressed, int maxCompressedBytes)β encodes one frame of audioint opus_custom_encode24 (OpusCustomEncoder *st, const opus_int32 *pcm, int frame_size, unsigned char *compressed, int maxCompressedBytes)β encodes one frame of audio (24-bit edition)int opus_custom_encoder_ctl (OpusCustomEncoder *OPUS_RESTRICT st, int request,...)β runs a CTL function on an Opus custom encoderint opus_custom_decoder_get_size (const OpusCustomMode *mode, int channels)β how big is anOpusCustomDecoderstruct, bestie?int opus_custom_decoder_init (OpusCustomDecoder *st, const OpusCustomMode *mode, int channels)β sets up a decoder state you already allocated. the memorystpoints at must be the size thatopus_custom_decoder_get_sizegave you, fr frOpusCustomDecoder * opus_custom_decoder_create (const OpusCustomMode *mode, int channels, int *error)β creates a new decoder state πvoid opus_custom_decoder_destroy (OpusCustomDecoder *st)β destroys a decoder stateint opus_custom_decode_float (OpusCustomDecoder *st, const unsigned char *data, int len, float *pcm, int frame_size)β decodes an opus custom frame and gives you floating point output π§int opus_custom_decode (OpusCustomDecoder *st, const unsigned char *data, int len, opus_int16 *pcm, int frame_size)β decodes an opus custom frameint opus_custom_decode24 (OpusCustomDecoder *st, const unsigned char *data, int len, opus_int32 *pcm, int frame_size)β decodes an opus custom frame (24-bit girlies rise up)int opus_custom_decoder_ctl (OpusCustomDecoder *OPUS_RESTRICT st, int request,...)β runs a CTL function on an Opus custom decoder
π Detailed Description π
Opus-Custom reference implementation API. that's it, that's the vibe. iconic behavior honestly π₯
π Macro Definition Documentation π
#define OPUS_CUSTOM_EXPORT
#define OPUS_CUSTOM_EXPORT_STATIC
β Author β
Generated automatically by Doxygen for Opus from the source code. the robots did this one, we just made it cute π
okay so that's the whole page bestie, you ate that π«Ά this wasopus_custom.h(3)from Opus version 1.6.1, datedThu Jan 29 2026 14:35:32, and it lives in section 3 of the manual. go forth and encode π β¨
π¦ where this page comes from
- ubuntu resolute: libopus-doc 1.6.1-1 Β· BSD-3-Clause
- ubuntu stonking: libopus-doc 1.6.1-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms