queueAudioFrame

abstract suspend fun queueAudioFrame(frame: RawFrame)

Queues an audio RawFrame to be encoded.

The RawFrame.rawBuffer is a duplicate of the original frame. If you need to modify the frame, you should create a new ByteBuffer and copy the data from the original frame. Do not modify the original RawFrame.rawBuffer.

You must call RawFrame.close when you are done with the frame to release resources. The IPipelineOutput is responsible for closing even if an error occurs.

Also, to avoid blocking other outputs, you should execute this method in another thread than the calling thread.

Parameters

frame

The audio RawFrame to queue.