Function cras::outputByteBuffer(allocator_t, const uint8_t *, size_t)

Function Documentation

uint8_t *cras::outputByteBuffer(allocator_t allocator, const uint8_t *bytes, size_t length)

Allocate enough bytes using the given allocator and copy the given bytes into the buffer.

Parameters:
  • allocator[in] The allocator to use.

  • bytes[in] The bytes to copy into the allocated buffer.

  • length[in] Length of bytes.

Returns:

Pointer to the allocated buffer.