opus_custom_encode_float method

int opus_custom_encode_float(
  1. Pointer<OpusCustomEncoder> st,
  2. Pointer<Float> pcm,
  3. int frame_size,
  4. Pointer<Uint8> compressed,
  5. int maxCompressedBytes,
)

Encodes a frame of audio. @param in st OpusCustomEncoder*: Encoder state @param in pcm float*: PCM audio in float format, with a normal range of +/-1.0. Samples with a range beyond +/-1.0 are supported but will be clipped by decoders using the integer API and should only be used if it is known that the far end supports extended dynamic range. There must be exactly frame_size samples per channel. @param in frame_size int: Number of samples per frame of input signal @param out compressed char *: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long. @param in maxCompressedBytes int: Maximum number of bytes to use for compressing the frame (can change from one frame to another) @return Number of bytes written to "compressed". If negative, an error has occurred (see error codes). It is IMPORTANT that the length returned be somehow transmitted to the decoder. Otherwise, no decoding is possible.

Implementation

int opus_custom_encode_float(
  ffi.Pointer<OpusCustomEncoder> st,
  ffi.Pointer<ffi.Float> pcm,
  int frame_size,
  ffi.Pointer<ffi.Uint8> compressed,
  int maxCompressedBytes,
) {
  return _opus_custom_encode_float(
      st, pcm, frame_size, compressed, maxCompressedBytes);
}