48#define OPUS_BAD_ARG -1
50#define OPUS_BUFFER_TOO_SMALL -2
52#define OPUS_INTERNAL_ERROR -3
54#define OPUS_INVALID_PACKET -4
56#define OPUS_UNIMPLEMENTED -5
58#define OPUS_INVALID_STATE -6
60#define OPUS_ALLOC_FAIL -7
68# if defined(OPUS_BUILD) && defined(DLL_EXPORT)
69# define OPUS_EXPORT __declspec(dllexport)
73# elif defined(__GNUC__) && defined(OPUS_BUILD)
74# define OPUS_EXPORT __attribute__ ((visibility ("default")))
80# if !defined(OPUS_GNUC_PREREQ)
81# if defined(__GNUC__)&&defined(__GNUC_MINOR__)
82# define OPUS_GNUC_PREREQ(_maj,_min) \
83 ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))
85# define OPUS_GNUC_PREREQ(_maj,_min) 0
89#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
90# if OPUS_GNUC_PREREQ(3,0)
91# define OPUS_RESTRICT __restrict__
92# elif (defined(_MSC_VER) && _MSC_VER >= 1400)
93# define OPUS_RESTRICT __restrict
98# define OPUS_RESTRICT restrict
101#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
102# if OPUS_GNUC_PREREQ(2,7)
103# define OPUS_INLINE __inline__
104# elif (defined(_MSC_VER))
105# define OPUS_INLINE __inline
110# define OPUS_INLINE inline
116#if defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)
117# define OPUS_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
119# define OPUS_WARN_UNUSED_RESULT
121#if !defined(OPUS_BUILD) && defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)
122# define OPUS_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x)))
124# define OPUS_ARG_NONNULL(_x)
130#define OPUS_SET_APPLICATION_REQUEST 4000
131#define OPUS_GET_APPLICATION_REQUEST 4001
132#define OPUS_SET_BITRATE_REQUEST 4002
133#define OPUS_GET_BITRATE_REQUEST 4003
134#define OPUS_SET_MAX_BANDWIDTH_REQUEST 4004
135#define OPUS_GET_MAX_BANDWIDTH_REQUEST 4005
136#define OPUS_SET_VBR_REQUEST 4006
137#define OPUS_GET_VBR_REQUEST 4007
138#define OPUS_SET_BANDWIDTH_REQUEST 4008
139#define OPUS_GET_BANDWIDTH_REQUEST 4009
140#define OPUS_SET_COMPLEXITY_REQUEST 4010
141#define OPUS_GET_COMPLEXITY_REQUEST 4011
142#define OPUS_SET_INBAND_FEC_REQUEST 4012
143#define OPUS_GET_INBAND_FEC_REQUEST 4013
144#define OPUS_SET_PACKET_LOSS_PERC_REQUEST 4014
145#define OPUS_GET_PACKET_LOSS_PERC_REQUEST 4015
146#define OPUS_SET_DTX_REQUEST 4016
147#define OPUS_GET_DTX_REQUEST 4017
148#define OPUS_SET_VBR_CONSTRAINT_REQUEST 4020
149#define OPUS_GET_VBR_CONSTRAINT_REQUEST 4021
150#define OPUS_SET_FORCE_CHANNELS_REQUEST 4022
151#define OPUS_GET_FORCE_CHANNELS_REQUEST 4023
152#define OPUS_SET_SIGNAL_REQUEST 4024
153#define OPUS_GET_SIGNAL_REQUEST 4025
154#define OPUS_GET_LOOKAHEAD_REQUEST 4027
156#define OPUS_GET_SAMPLE_RATE_REQUEST 4029
157#define OPUS_GET_FINAL_RANGE_REQUEST 4031
158#define OPUS_GET_PITCH_REQUEST 4033
159#define OPUS_SET_GAIN_REQUEST 4034
160#define OPUS_GET_GAIN_REQUEST 4045
161#define OPUS_SET_LSB_DEPTH_REQUEST 4036
162#define OPUS_GET_LSB_DEPTH_REQUEST 4037
163#define OPUS_GET_LAST_PACKET_DURATION_REQUEST 4039
164#define OPUS_SET_EXPERT_FRAME_DURATION_REQUEST 4040
165#define OPUS_GET_EXPERT_FRAME_DURATION_REQUEST 4041
166#define OPUS_SET_PREDICTION_DISABLED_REQUEST 4042
167#define OPUS_GET_PREDICTION_DISABLED_REQUEST 4043
169#define OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST 4046
170#define OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST 4047
171#define OPUS_GET_IN_DTX_REQUEST 4049
172#define OPUS_SET_DRED_DURATION_REQUEST 4050
173#define OPUS_GET_DRED_DURATION_REQUEST 4051
174#define OPUS_SET_DNN_BLOB_REQUEST 4052
176#define OPUS_SET_OSCE_BWE_REQUEST 4054
177#define OPUS_GET_OSCE_BWE_REQUEST 4055
178#define OPUS_SET_QEXT_REQUEST 4056
179#define OPUS_GET_QEXT_REQUEST 4057
180#define OPUS_SET_IGNORE_EXTENSIONS_REQUEST 4058
181#define OPUS_GET_IGNORE_EXTENSIONS_REQUEST 4059
184#define OPUS_HAVE_OPUS_PROJECTION_H
187#define opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
189#ifdef DISABLE_PTR_CHECK
192#define opus_check_int_ptr(ptr) (ptr)
193#define opus_check_uint_ptr(ptr) (ptr)
194#define opus_check_uint8_ptr(ptr) (ptr)
195#define opus_check_val16_ptr(ptr) (ptr)
196#define opus_check_void_ptr(ptr) (ptr)
198#define opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
199#define opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))
200#define opus_check_uint8_ptr(ptr) ((ptr) + ((ptr) - (opus_uint8*)(ptr)))
201#define opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr)))
202#define opus_check_void_ptr(x) ((void)((void *)0 == (x)), (x))
211#define OPUS_AUTO -1000
212#define OPUS_BITRATE_MAX -1
216#define OPUS_APPLICATION_VOIP 2048
219#define OPUS_APPLICATION_AUDIO 2049
222#define OPUS_APPLICATION_RESTRICTED_LOWDELAY 2051
224#define OPUS_APPLICATION_RESTRICTED_SILK 2052
226#define OPUS_APPLICATION_RESTRICTED_CELT 2053
228#define OPUS_SIGNAL_VOICE 3001
229#define OPUS_SIGNAL_MUSIC 3002
230#define OPUS_BANDWIDTH_NARROWBAND 1101
231#define OPUS_BANDWIDTH_MEDIUMBAND 1102
232#define OPUS_BANDWIDTH_WIDEBAND 1103
233#define OPUS_BANDWIDTH_SUPERWIDEBAND 1104
234#define OPUS_BANDWIDTH_FULLBAND 1105
236#define OPUS_FRAMESIZE_ARG 5000
237#define OPUS_FRAMESIZE_2_5_MS 5001
238#define OPUS_FRAMESIZE_5_MS 5002
239#define OPUS_FRAMESIZE_10_MS 5003
240#define OPUS_FRAMESIZE_20_MS 5004
241#define OPUS_FRAMESIZE_40_MS 5005
242#define OPUS_FRAMESIZE_60_MS 5006
243#define OPUS_FRAMESIZE_80_MS 5007
244#define OPUS_FRAMESIZE_100_MS 5008
245#define OPUS_FRAMESIZE_120_MS 5009
280#define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, opus_check_int(x)
286#define OPUS_GET_COMPLEXITY(x) OPUS_GET_COMPLEXITY_REQUEST, opus_check_int_ptr(x)
299#define OPUS_SET_BITRATE(x) OPUS_SET_BITRATE_REQUEST, opus_check_int(x)
307#define OPUS_GET_BITRATE(x) OPUS_GET_BITRATE_REQUEST, opus_check_int_ptr(x)
322#define OPUS_SET_VBR(x) OPUS_SET_VBR_REQUEST, opus_check_int(x)
333#define OPUS_GET_VBR(x) OPUS_GET_VBR_REQUEST, opus_check_int_ptr(x)
351#define OPUS_SET_VBR_CONSTRAINT(x) OPUS_SET_VBR_CONSTRAINT_REQUEST, opus_check_int(x)
361#define OPUS_GET_VBR_CONSTRAINT(x) OPUS_GET_VBR_CONSTRAINT_REQUEST, opus_check_int_ptr(x)
376#define OPUS_SET_FORCE_CHANNELS(x) OPUS_SET_FORCE_CHANNELS_REQUEST, opus_check_int(x)
386#define OPUS_GET_FORCE_CHANNELS(x) OPUS_GET_FORCE_CHANNELS_REQUEST, opus_check_int_ptr(x)
404#define OPUS_SET_MAX_BANDWIDTH(x) OPUS_SET_MAX_BANDWIDTH_REQUEST, opus_check_int(x)
417#define OPUS_GET_MAX_BANDWIDTH(x) OPUS_GET_MAX_BANDWIDTH_REQUEST, opus_check_int_ptr(x)
436#define OPUS_SET_BANDWIDTH(x) OPUS_SET_BANDWIDTH_REQUEST, opus_check_int(x)
448#define OPUS_SET_SIGNAL(x) OPUS_SET_SIGNAL_REQUEST, opus_check_int(x)
458#define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, opus_check_int_ptr(x)
475#define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, opus_check_int(x)
489#define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, opus_check_int_ptr(x)
504#define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, opus_check_int_ptr(x)
516#define OPUS_SET_INBAND_FEC(x) OPUS_SET_INBAND_FEC_REQUEST, opus_check_int(x)
526#define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, opus_check_int_ptr(x)
535#define OPUS_SET_PACKET_LOSS_PERC(x) OPUS_SET_PACKET_LOSS_PERC_REQUEST, opus_check_int(x)
541#define OPUS_GET_PACKET_LOSS_PERC(x) OPUS_GET_PACKET_LOSS_PERC_REQUEST, opus_check_int_ptr(x)
552#define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, opus_check_int(x)
561#define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, opus_check_int_ptr(x)
580#define OPUS_SET_LSB_DEPTH(x) OPUS_SET_LSB_DEPTH_REQUEST, opus_check_int(x)
586#define OPUS_GET_LSB_DEPTH(x) OPUS_GET_LSB_DEPTH_REQUEST, opus_check_int_ptr(x)
611#define OPUS_SET_EXPERT_FRAME_DURATION(x) OPUS_SET_EXPERT_FRAME_DURATION_REQUEST, opus_check_int(x)
628#define OPUS_GET_EXPERT_FRAME_DURATION(x) OPUS_GET_EXPERT_FRAME_DURATION_REQUEST, opus_check_int_ptr(x)
639#define OPUS_SET_PREDICTION_DISABLED(x) OPUS_SET_PREDICTION_DISABLED_REQUEST, opus_check_int(x)
648#define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, opus_check_int_ptr(x)
652#define OPUS_SET_DRED_DURATION(x) OPUS_SET_DRED_DURATION_REQUEST, opus_check_int(x)
655#define OPUS_GET_DRED_DURATION(x) OPUS_GET_DRED_DURATION_REQUEST, opus_check_int_ptr(x)
659#define OPUS_SET_DNN_BLOB(data, len) OPUS_SET_DNN_BLOB_REQUEST, opus_check_void_ptr(data), opus_check_int(len)
664#define OPUS_SET_QEXT(x) OPUS_SET_QEXT_REQUEST, opus_check_int(x)
667#define OPUS_GET_QEXT(x) OPUS_GET_QEXT_REQUEST, opus_check_int_ptr(x)
710#define OPUS_RESET_STATE 4028
720#define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, opus_check_uint_ptr(x)
734#define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, opus_check_int_ptr(x)
742#define OPUS_GET_SAMPLE_RATE(x) OPUS_GET_SAMPLE_RATE_REQUEST, opus_check_int_ptr(x)
757#define OPUS_SET_PHASE_INVERSION_DISABLED(x) OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST, opus_check_int(x)
766#define OPUS_GET_PHASE_INVERSION_DISABLED(x) OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST, opus_check_int_ptr(x)
776#define OPUS_GET_IN_DTX(x) OPUS_GET_IN_DTX_REQUEST, opus_check_int_ptr(x)
795#define OPUS_SET_GAIN(x) OPUS_SET_GAIN_REQUEST, opus_check_int(x)
800#define OPUS_GET_GAIN(x) OPUS_GET_GAIN_REQUEST, opus_check_int_ptr(x)
805#define OPUS_GET_LAST_PACKET_DURATION(x) OPUS_GET_LAST_PACKET_DURATION_REQUEST, opus_check_int_ptr(x)
817#define OPUS_GET_PITCH(x) OPUS_GET_PITCH_REQUEST, opus_check_int_ptr(x)
824 #define OPUS_SET_OSCE_BWE(x) OPUS_SET_OSCE_BWE_REQUEST, opus_check_int(x)
829 #define OPUS_GET_OSCE_BWE(x) OPUS_GET_OSCE_BWE_REQUEST, opus_check_int_ptr(x)
834#define OPUS_SET_IGNORE_EXTENSIONS(x) OPUS_SET_IGNORE_EXTENSIONS_REQUEST, opus_check_int(x)
837#define OPUS_GET_IGNORE_EXTENSIONS(x) OPUS_GET_IGNORE_EXTENSIONS_REQUEST, opus_check_int_ptr(x)
const char * opus_strerror(int error)
Converts an opus error code into a human readable string.
const char * opus_get_version_string(void)
Gets the libopus version string.
Opus reference implementation types.