opus_repacketizer_out_range method

int opus_repacketizer_out_range(
  1. Pointer<OpusRepacketizer> rp,
  2. int begin,
  3. int end,
  4. Pointer<Uint8> data,
  5. int maxlen,
)

Construct a new packet from data previously submitted to the repacketizer state via opus_repacketizer_cat(). @param rp OpusRepacketizer*: The repacketizer state from which to construct the new packet. @param begin int: The index of the first frame in the current repacketizer state to include in the output. @param end int: One past the index of the last frame in the current repacketizer state to include in the output. @paramout data const unsigned char*: The buffer in which to store the output packet. @param maxlen opus_int32: The maximum number of bytes to store in the output buffer. In order to guarantee success, this should be at least 1276 for a single frame, or for multiple frames, 1277*(end-begin). However, 1*(end-begin) plus the size of all packet data submitted to the repacketizer since the last call to opus_repacketizer_init() or opus_repacketizer_create() is also sufficient, and possibly much smaller. @returns The total size of the output packet on success, or an error code on failure. @retval #OPUS_BAD_ARG [begin,end) was an invalid range of frames (begin < 0, begin >= end, or end > opus_repacketizer_get_nb_frames()). @retval #OPUS_BUFFER_TOO_SMALL a maxlen was insufficient to contain the complete output packet.

Implementation

int opus_repacketizer_out_range(
  ffi.Pointer<OpusRepacketizer> rp,
  int begin,
  int end,
  ffi.Pointer<ffi.Uint8> data,
  int maxlen,
) {
  return _opus_repacketizer_out_range(rp, begin, end, data, maxlen);
}