opus_decoderctls(3)
π opus_decoderctls β Decoder related CTLs π
okay bestie, sit down, hydrate, because we're talking about decoder CTLs from the Opus manual, page opus_decoderctls(3). this is the little collection of macros that let you poke at a decoder and ask it questions (or tell it things). it's giving β¨ remote control energy β¨. no cap.
β¨ SYNOPSIS β¨
π Macros π
#define OPUS_SET_GAIN(x)β Configures decoder gain adjustment.#define OPUS_GET_GAIN(x)β Gets the decoder's configured gain adjustment.#define OPUS_GET_LAST_PACKET_DURATION(x)β Gets the duration (in samples) of the last packet successfully decoded or concealed.#define OPUS_GET_PITCH(x)β Gets the pitch of the last decoded frame, if available.#define OPUS_SET_OSCE_BWE(x)β Enables blind bandwidth extension for wideband signals if decoding sampling rate is 48 kHz.#define OPUS_GET_OSCE_BWE(x)β Gets blind bandwidth extension flag for wideband signals if decoding sampling rate is 48 kHz.#define OPUS_SET_IGNORE_EXTENSIONS(x)β If set to 1, the decoder will ignore all extensions found in the padding area (does not affect DRED, which is decoded separately).#define OPUS_GET_IGNORE_EXTENSIONS(x)β Gets whether the decoder is ignoring extensions.
πΈ Detailed Description πΈ
also go peek at Generic CTLs, Encoder related CTLs, and Opus Decoder β they're the besties of this page π«Ά
π Macro Definition Documentation π
π
#define OPUS_GET_GAIN( x)
Gets the decoder's configured gain adjustment.
See also: OPUS_SET_GAIN
Parameters:
xopus_int32 *: Amount to scale PCM signal by in Q8 dB units.
π
#define OPUS_GET_IGNORE_EXTENSIONS( x)
Gets whether the decoder is ignoring extensions.
π
#define OPUS_GET_LAST_PACKET_DURATION( x)
Gets the duration (in samples) of the last packet successfully decoded or concealed.
Parameters:
xopus_int32 *: Number of samples (at current sampling rate).
π
#define OPUS_GET_OSCE_BWE( x)
Gets blind bandwidth extension flag for wideband signals if decoding sampling rate is 48 kHz.
Parameters:
xopus_int32 *: 1 if bwe enabled, 0 if disabled.
π
#define OPUS_GET_PITCH( x)
Gets the pitch of the last decoded frame, if available. This can be used for any post-processing algorithm requiring the use of pitch, e.g. time stretching/shortening. If the last frame was not voiced, or if the pitch was not coded in the frame, then zero is returned.
This CTL is only implemented for decoder instances.
Parameters:
xopus_int32 *: pitch period at 48 kHz (or 0 if not available)
π
#define OPUS_SET_GAIN( x)
Configures decoder gain adjustment. Scales the decoded output by a factor specified in Q8 dB units. This has a maximum range of -32768 to 32767 inclusive, and returns OPUS_BAD_ARG otherwise. The default is zero indicating no adjustment. This setting survives decoder reset.
gain = pow(10, x/(20.0*256))
Parameters:
xopus_int32: Amount to scale PCM signal by in Q8 dB units.
heads up bestie: step outside that-32768to32767range and it's a wholeOPUS_BAD_ARGsituation π so stay in your lane with the numbers, fr fr.
π
#define OPUS_SET_IGNORE_EXTENSIONS( x)
If set to 1, the decoder will ignore all extensions found in the padding area (does not affect DRED, which is decoded separately).
π
#define OPUS_SET_OSCE_BWE( x)
Enables blind bandwidth extension for wideband signals if decoding sampling rate is 48 kHz.
Parameters:
xopus_int32: 1 enables bandwidth extension, 0 disables it. The default is 0.
βοΈ Author βοΈ
Generated automatically by Doxygen for Opus from the source code.
and that's the whole page, bestie π Version 1.6.1, born Thu Jan 29 2026 14:35:32, and it ate, no crumbs. go forth and control your decoders, main character ππ¦β¨
π¦ 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