opus_encoder_init method

int opus_encoder_init(
  1. Pointer<OpusEncoder> st,
  2. int Fs,
  3. int channels,
  4. int application,
)

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 opus_encoder_create(),opus_encoder_get_size() To reset a previously initialized state, use the #OPUS_RESET_STATE CTL. @param in st OpusEncoder*: Encoder state @param in Fs opus_int32: Sampling rate of input signal (Hz) This must be one of 8000, 12000, 16000, 24000, or 48000. @param in channels int: Number of channels (1 or 2) in input signal @param in application int: Coding mode (OPUS_APPLICATION_VOIP/OPUS_APPLICATION_AUDIO/OPUS_APPLICATION_RESTRICTED_LOWDELAY) @retval #OPUS_OK Success or @ref opus_errorcodes

Implementation

int opus_encoder_init(
  ffi.Pointer<OpusEncoder> st,
  int Fs,
  int channels,
  int application,
) {
  return _opus_encoder_init(st, Fs, channels, application);
}