Mixes several inputs of s16le mono PCM into one stream, a chunk at a time, for a model that has one audio input (Gemini Live).
Inputs arrive in real time but not in step, so the caller pulls a chunk
on its own clock (pull/1 every chunk_ms) and each input gives what it
has. An input starts being mixed once it has two chunks buffered, which
rides out a frame arriving just after the pull instead of mixing in a gap
of silence. It stops when it runs dry, and buffers at most max_ms
(the oldest is dropped), so a burst doesn't add latency for good.
Summary
Functions
Options: :rate (default 16 kHz), :chunk_ms (20), :max_ms (200).
One chunk of the inputs mixed, or nil when none is being mixed.