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 cap
  • typedef 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 void
  • int opus_custom_encoder_get_size (const OpusCustomMode *mode, int channels) β€” tells you how big an OpusCustomEncoder struct is gonna be
  • OpusCustomEncoder * opus_custom_encoder_create (const OpusCustomMode *mode, int channels, int *error) β€” spins up a fresh encoder state, slay
  • void 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 audio
  • int 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 encoder
  • int opus_custom_decoder_get_size (const OpusCustomMode *mode, int channels) β€” how big is an OpusCustomDecoder struct, bestie?
  • int opus_custom_decoder_init (OpusCustomDecoder *st, const OpusCustomMode *mode, int channels) β€” sets up a decoder state you already allocated. the memory st points at must be the size that opus_custom_decoder_get_size gave you, fr fr
  • OpusCustomDecoder * 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 state
  • int 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 frame
  • int 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 was opus_custom.h(3) from Opus version 1.6.1, dated Thu Jan 29 2026 14:35:32, and it lives in section 3 of the manual. go forth and encode πŸ’…βœ¨
πŸ“¦ where this page comes from