PlaybackAudio implements AudioProvider::start_input / stop_input / apps:
each capture gets an id, its SourceInput is kept in the capture state,
and the Kotlin side is asked (Bridge.startAudioInput) to capture
everything but our uid or the uid of one app's package, delivering to
Native.onAudioInput(id, ...), which pushes into that input from a reused
per-thread buffer. An app picked by name is looked up among the
launchable apps (label or package) and falls back to the name as a
package. Picking by process fails on Android. apps() lists the
launchable apps (Bridge.launchableApps, "label<TAB>package" lines),
because Android cannot tell which apps play.
The Kotlin counterpart follows in the next commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G