collectAsBuffer

suspend fun AudioFlow.collectAsBuffer(format: AudioFileFormat): Buffer

Collects this flow and returns an in-memory buffer containing the encoded file bytes for format (WAV, AIFF, or AU).