pub unsafe extern "C" fn opus_encoder_init(
st: *mut OpusEncoder,
Fs: opus_int32,
channels: c_int,
application: c_int,
) -> c_intExpand description
Initializes a previously allocated encoder state The memory pointed to by st must be at least the size returned by opus_encoder_get_size(). This is intended for applications which use their own allocator instead of malloc.
§See also
[
opus_encoder_create(),opus_encoder_get_size()] To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
§Arguments
st[in] - OpusEncoder*: Encoder stateFs[in] - opus_int32: Sampling rate of input signal (Hz) This must be one of 8000, 12000, 16000, 24000, or 48000.channels[in] - int: Number of channels (1 or 2) in input signalapplication[in] - int: Coding mode (one of OPUS_APPLICATION_VOIP, OPUS_APPLICATION_AUDIO, or OPUS_APPLICATION_RESTRICTED_LOWDELAY) @retval #OPUS_OK Success or [opus_errorcodes]