opus_custom_encode method
- Pointer<
OpusCustomEncoder> st, - Pointer<
Int16> pcm, - int frame_size,
- Pointer<
Uint8> compressed, - int maxCompressedBytes,
Encodes a frame of audio.
@param in
st OpusCustomEncoder*: Encoder state
@param in
pcm opus_int16*: PCM audio in signed 16-bit format (native endian).
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(
ffi.Pointer<OpusCustomEncoder> st,
ffi.Pointer<ffi.Int16> pcm,
int frame_size,
ffi.Pointer<ffi.Uint8> compressed,
int maxCompressedBytes,
) {
return _opus_custom_encode(
st, pcm, frame_size, compressed, maxCompressedBytes);
}