Opus
Opus audio codec (RFC 6716): API and operations manual
1.6
Loading...
Searching...
No Matches
Macros
Decoder related CTLs

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

See also
Generic CTLs, Encoder related CTLs, Opus Decoder

Macro Definition Documentation

◆ OPUS_GET_GAIN

#define OPUS_GET_GAIN (   x)

Gets the decoder's configured gain adjustment.

See also
OPUS_SET_GAIN
Parameters
[out]xopus_int32 *: Amount to scale PCM signal by in Q8 dB units.

◆ OPUS_GET_IGNORE_EXTENSIONS

#define OPUS_GET_IGNORE_EXTENSIONS (   x)

Gets whether the decoder is ignoring extensions.

◆ OPUS_GET_LAST_PACKET_DURATION

#define OPUS_GET_LAST_PACKET_DURATION (   x)

Gets the duration (in samples) of the last packet successfully decoded or concealed.

Parameters
[out]xopus_int32 *: Number of samples (at current sampling rate).

◆ OPUS_GET_OSCE_BWE

#define OPUS_GET_OSCE_BWE (   x)

Gets blind bandwidth extension flag for wideband signals if decoding sampling rate is 48 kHz.

Parameters
[out]xopus_int32 *: 1 if bwe enabled, 0 if disabled.

◆ OPUS_GET_PITCH

#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
[out]xopus_int32 *: pitch period at 48 kHz (or 0 if not available)

◆ OPUS_SET_GAIN

#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
[in]xopus_int32: Amount to scale PCM signal by in Q8 dB units.

◆ OPUS_SET_IGNORE_EXTENSIONS

#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).

◆ OPUS_SET_OSCE_BWE

#define OPUS_SET_OSCE_BWE (   x)

Enables blind bandwidth extension for wideband signals if decoding sampling rate is 48 kHz.

Parameters
[in]xopus_int32 : 1 enables bandwidth extension, 0 disables it. The default is 0.
For more information visit the Opus Website.