.TH "opus_decoderctls" 3 "Fri Feb 11 2022" "Version 1.3.1" "Opus" \" -*- nroff -*- .ad l .nh .SH NAME opus_decoderctls \- Decoder related CTLs .SH SYNOPSIS .br .PP .SS "Macros" .in +1c .ti -1c .RI "#define \fBOPUS_SET_GAIN\fP(x)" .br .RI "Configures decoder gain adjustment\&. " .ti -1c .RI "#define \fBOPUS_GET_GAIN\fP(x)" .br .RI "Gets the decoder's configured gain adjustment\&. " .ti -1c .RI "#define \fBOPUS_GET_LAST_PACKET_DURATION\fP(x)" .br .RI "Gets the duration (in samples) of the last packet successfully decoded or concealed\&. " .ti -1c .RI "#define \fBOPUS_GET_PITCH\fP(x)" .br .RI "Gets the pitch of the last decoded frame, if available\&. " .in -1c .SH "Detailed Description" .PP .PP \fBSee also\fP .RS 4 \fBGeneric CTLs\fP, \fBEncoder related CTLs\fP, \fBOpus Decoder\fP .RE .PP .SH "Macro Definition Documentation" .PP .SS "#define OPUS_GET_GAIN(x)" .PP Gets the decoder's configured gain adjustment\&. .PP \fBSee also\fP .RS 4 \fBOPUS_SET_GAIN\fP .RE .PP \fBParameters\fP .RS 4 \fIx\fP \fCopus_int32 *\fP: Amount to scale PCM signal by in Q8 dB units\&. .RE .PP .SS "#define OPUS_GET_LAST_PACKET_DURATION(x)" .PP Gets the duration (in samples) of the last packet successfully decoded or concealed\&. .PP \fBParameters\fP .RS 4 \fIx\fP \fCopus_int32 *\fP: Number of samples (at current sampling rate)\&. .RE .PP .SS "#define OPUS_GET_PITCH(x)" .PP 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\&. .PP This CTL is only implemented for decoder instances\&. .PP \fBParameters\fP .RS 4 \fIx\fP \fCopus_int32 *\fP: pitch period at 48 kHz (or 0 if not available) .RE .PP .SS "#define OPUS_SET_GAIN(x)" .PP 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\&. .PP gain = pow(10, x/(20\&.0*256)) .PP \fBParameters\fP .RS 4 \fIx\fP \fCopus_int32\fP: Amount to scale PCM signal by in Q8 dB units\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Opus from the source code\&.