encode

fun encode(data: AudioData)(source)

The encode() method of the AudioEncoder interface enqueues a control message to encode a given AudioData object.

MDN Reference