AudioBuffer
Decoded PCM, ready for the engine's filter chain.
Unlike a video frame, audio does cross into Kotlin memory. It has to: resampling, channel remixing, tempo change and the drift correction all happen in the engine, and audio is small. One second of 48 kHz stereo float is 384 KB, against 187 MB for a second of 1080p60 video.
Properties
The rate, the channels and the sample format of this buffer.
Sample frames in this buffer. One frame is one sample for every channel.
The epoch the packets were offered in. See VideoDecoder.flush.
Functions
Copies every channel into into interleaved, frame by frame, starting at offset: the frameCount times format.channels values the engine hands to its ring. The engine reads each buffer through this. The default builds it from copyChannel and allocates one channel of scratch per call; a backend whose samples decode straight into this layout overrides it.