asFlow

fun asFlow(defensiveCopy: Boolean = true): Flow<ByteArray>

Returns the audio data as a Flow of byte array chunks.

Parameters

defensiveCopy

If true (default), each emitted chunk is a copy. Set to false for performance-critical streaming where you guarantee not to mutate the received arrays.