feed

fun feed(interleaved: FloatArray, frames: Int, channels: Int, ptsMicros: Long? = null)

Takes frames sample frames of channels-channel interleaved audio and analyses whatever it can. ptsMicros is the media timestamp of the first frame, or null when unknown. Zero and negative positions are valid timestamps.


fun feed(interleaved: FloatArray, frames: Int, format: AudioFormat, ptsMicros: Long? = null)

PCM with explicit layout metadata. Its sample rate must match this analyser. Reset before changing channels or layout; a different sample rate needs a new analyser. Inputs are floats regardless of AudioFormat.sampleFormat. Non-finite values become zero and finite values are limited to amplitude +/-16, with each change counted in sanitizedSamples.