.TH "opus_defines.h" 3 "Fri Feb 11 2022" "Version 1.3.1" "Opus" \" -*- nroff -*- .ad l .nh .SH NAME opus_defines.h \- Opus reference implementation constants\&. .SH SYNOPSIS .br .PP \fC#include 'opus_types\&.h'\fP .br .SS "Macros" .in +1c .ti -1c .RI "#define \fBOPUS_OK\fP" .br .RI "No error\&. " .ti -1c .RI "#define \fBOPUS_BAD_ARG\fP" .br .RI "One or more invalid/out of range arguments\&. " .ti -1c .RI "#define \fBOPUS_BUFFER_TOO_SMALL\fP" .br .RI "Not enough bytes allocated in the buffer\&. " .ti -1c .RI "#define \fBOPUS_INTERNAL_ERROR\fP" .br .RI "An internal error was detected\&. " .ti -1c .RI "#define \fBOPUS_INVALID_PACKET\fP" .br .RI "The compressed data passed is corrupted\&. " .ti -1c .RI "#define \fBOPUS_UNIMPLEMENTED\fP" .br .RI "Invalid/unsupported request number\&. " .ti -1c .RI "#define \fBOPUS_INVALID_STATE\fP" .br .RI "An encoder or decoder structure is invalid or already freed\&. " .ti -1c .RI "#define \fBOPUS_ALLOC_FAIL\fP" .br .RI "Memory allocation has failed\&. " .ti -1c .RI "#define \fBOPUS_AUTO\fP" .br .RI "Auto/default setting\&. " .ti -1c .RI "#define \fBOPUS_BITRATE_MAX\fP" .br .RI "Maximum bitrate\&. " .ti -1c .RI "#define \fBOPUS_APPLICATION_VOIP\fP" .br .RI "Best for most VoIP/videoconference applications where listening quality and intelligibility matter most\&. " .ti -1c .RI "#define \fBOPUS_APPLICATION_AUDIO\fP" .br .RI "Best for broadcast/high-fidelity application where the decoded audio should be as close as possible to the input\&. " .ti -1c .RI "#define \fBOPUS_APPLICATION_RESTRICTED_LOWDELAY\fP" .br .RI "Only use when lowest-achievable latency is what matters most\&. " .ti -1c .RI "#define \fBOPUS_SIGNAL_VOICE\fP 3001" .br .RI "Signal being encoded is voice\&. " .ti -1c .RI "#define \fBOPUS_SIGNAL_MUSIC\fP 3002" .br .RI "Signal being encoded is music\&. " .ti -1c .RI "#define \fBOPUS_BANDWIDTH_NARROWBAND\fP" .br .RI "4 kHz bandpass " .ti -1c .RI "#define \fBOPUS_BANDWIDTH_MEDIUMBAND\fP" .br .RI "6 kHz bandpass " .ti -1c .RI "#define \fBOPUS_BANDWIDTH_WIDEBAND\fP" .br .RI "8 kHz bandpass " .ti -1c .RI "#define \fBOPUS_BANDWIDTH_SUPERWIDEBAND\fP" .br .RI "12 kHz bandpass " .ti -1c .RI "#define \fBOPUS_BANDWIDTH_FULLBAND\fP" .br .RI "20 kHz bandpass " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_ARG\fP 5000" .br .RI "Select frame size from the argument (default) " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_2_5_MS\fP 5001" .br .RI "Use 2\&.5 ms frames\&. " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_5_MS\fP 5002" .br .RI "Use 5 ms frames\&. " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_10_MS\fP 5003" .br .RI "Use 10 ms frames\&. " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_20_MS\fP 5004" .br .RI "Use 20 ms frames\&. " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_40_MS\fP 5005" .br .RI "Use 40 ms frames\&. " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_60_MS\fP 5006" .br .RI "Use 60 ms frames\&. " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_80_MS\fP 5007" .br .RI "Use 80 ms frames\&. " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_100_MS\fP 5008" .br .RI "Use 100 ms frames\&. " .ti -1c .RI "#define \fBOPUS_FRAMESIZE_120_MS\fP 5009" .br .RI "Use 120 ms frames\&. " .ti -1c .RI "#define \fBOPUS_SET_COMPLEXITY\fP(x)" .br .RI "Configures the encoder's computational complexity\&. " .ti -1c .RI "#define \fBOPUS_GET_COMPLEXITY\fP(x)" .br .RI "Gets the encoder's complexity configuration\&. " .ti -1c .RI "#define \fBOPUS_SET_BITRATE\fP(x)" .br .RI "Configures the bitrate in the encoder\&. " .ti -1c .RI "#define \fBOPUS_GET_BITRATE\fP(x)" .br .RI "Gets the encoder's bitrate configuration\&. " .ti -1c .RI "#define \fBOPUS_SET_VBR\fP(x)" .br .RI "Enables or disables variable bitrate (VBR) in the encoder\&. " .ti -1c .RI "#define \fBOPUS_GET_VBR\fP(x)" .br .RI "Determine if variable bitrate (VBR) is enabled in the encoder\&. " .ti -1c .RI "#define \fBOPUS_SET_VBR_CONSTRAINT\fP(x)" .br .RI "Enables or disables constrained VBR in the encoder\&. " .ti -1c .RI "#define \fBOPUS_GET_VBR_CONSTRAINT\fP(x)" .br .RI "Determine if constrained VBR is enabled in the encoder\&. " .ti -1c .RI "#define \fBOPUS_SET_FORCE_CHANNELS\fP(x)" .br .RI "Configures mono/stereo forcing in the encoder\&. " .ti -1c .RI "#define \fBOPUS_GET_FORCE_CHANNELS\fP(x)" .br .RI "Gets the encoder's forced channel configuration\&. " .ti -1c .RI "#define \fBOPUS_SET_MAX_BANDWIDTH\fP(x)" .br .RI "Configures the maximum bandpass that the encoder will select automatically\&. " .ti -1c .RI "#define \fBOPUS_GET_MAX_BANDWIDTH\fP(x)" .br .RI "Gets the encoder's configured maximum allowed bandpass\&. " .ti -1c .RI "#define \fBOPUS_SET_BANDWIDTH\fP(x)" .br .RI "Sets the encoder's bandpass to a specific value\&. " .ti -1c .RI "#define \fBOPUS_SET_SIGNAL\fP(x)" .br .RI "Configures the type of signal being encoded\&. " .ti -1c .RI "#define \fBOPUS_GET_SIGNAL\fP(x)" .br .RI "Gets the encoder's configured signal type\&. " .ti -1c .RI "#define \fBOPUS_SET_APPLICATION\fP(x)" .br .RI "Configures the encoder's intended application\&. " .ti -1c .RI "#define \fBOPUS_GET_APPLICATION\fP(x)" .br .RI "Gets the encoder's configured application\&. " .ti -1c .RI "#define \fBOPUS_GET_LOOKAHEAD\fP(x)" .br .RI "Gets the total samples of delay added by the entire codec\&. " .ti -1c .RI "#define \fBOPUS_SET_INBAND_FEC\fP(x)" .br .RI "Configures the encoder's use of inband forward error correction (FEC)\&. " .ti -1c .RI "#define \fBOPUS_GET_INBAND_FEC\fP(x)" .br .RI "Gets encoder's configured use of inband forward error correction\&. " .ti -1c .RI "#define \fBOPUS_SET_PACKET_LOSS_PERC\fP(x)" .br .RI "Configures the encoder's expected packet loss percentage\&. " .ti -1c .RI "#define \fBOPUS_GET_PACKET_LOSS_PERC\fP(x)" .br .RI "Gets the encoder's configured packet loss percentage\&. " .ti -1c .RI "#define \fBOPUS_SET_DTX\fP(x)" .br .RI "Configures the encoder's use of discontinuous transmission (DTX)\&. " .ti -1c .RI "#define \fBOPUS_GET_DTX\fP(x)" .br .RI "Gets encoder's configured use of discontinuous transmission\&. " .ti -1c .RI "#define \fBOPUS_SET_LSB_DEPTH\fP(x)" .br .RI "Configures the depth of signal being encoded\&. " .ti -1c .RI "#define \fBOPUS_GET_LSB_DEPTH\fP(x)" .br .RI "Gets the encoder's configured signal depth\&. " .ti -1c .RI "#define \fBOPUS_SET_EXPERT_FRAME_DURATION\fP(x)" .br .RI "Configures the encoder's use of variable duration frames\&. " .ti -1c .RI "#define \fBOPUS_GET_EXPERT_FRAME_DURATION\fP(x)" .br .RI "Gets the encoder's configured use of variable duration frames\&. " .ti -1c .RI "#define \fBOPUS_SET_PREDICTION_DISABLED\fP(x)" .br .RI "If set to 1, disables almost all use of prediction, making frames almost completely independent\&. " .ti -1c .RI "#define \fBOPUS_GET_PREDICTION_DISABLED\fP(x)" .br .RI "Gets the encoder's configured prediction status\&. " .ti -1c .RI "#define \fBOPUS_RESET_STATE\fP" .br .RI "Resets the codec state to be equivalent to a freshly initialized state\&. " .ti -1c .RI "#define \fBOPUS_GET_FINAL_RANGE\fP(x)" .br .RI "Gets the final state of the codec's entropy coder\&. " .ti -1c .RI "#define \fBOPUS_GET_BANDWIDTH\fP(x)" .br .RI "Gets the encoder's configured bandpass or the decoder's last bandpass\&. " .ti -1c .RI "#define \fBOPUS_GET_SAMPLE_RATE\fP(x)" .br .RI "Gets the sampling rate the encoder or decoder was initialized with\&. " .ti -1c .RI "#define \fBOPUS_SET_PHASE_INVERSION_DISABLED\fP(x)" .br .RI "If set to 1, disables the use of phase inversion for intensity stereo, improving the quality of mono downmixes, but slightly reducing normal stereo quality\&. " .ti -1c .RI "#define \fBOPUS_GET_PHASE_INVERSION_DISABLED\fP(x)" .br .RI "Gets the encoder's configured phase inversion status\&. " .ti -1c .RI "#define \fBOPUS_GET_IN_DTX\fP(x)" .br .RI "Gets the DTX state of the encoder\&. " .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 .SS "Functions" .in +1c .ti -1c .RI "const char * \fBopus_strerror\fP (int error)" .br .RI "Converts an opus error code into a human readable string\&. " .ti -1c .RI "const char * \fBopus_get_version_string\fP (void)" .br .RI "Gets the libopus version string\&. " .in -1c .SH "Detailed Description" .PP Opus reference implementation constants\&. .SH "Author" .PP Generated automatically by Doxygen for Opus from the source code\&.