media3-custom-audio-processor

Installation
SKILL.md

Custom audio processors in a Media3 pipeline

A processor is a BaseAudioProcessor subclass installed in the sink's processor chain:

DefaultAudioSink.Builder(context).setAudioProcessorChain(
    DefaultAudioSink.DefaultAudioProcessorChain(
        arrayOf(myFilter, myGain),   // yours, in order
        SilenceSkippingAudioProcessor(...), SonicAudioProcessor(),
    ),
).build()

Four members matter: onConfigure (negotiate the format), isActive (in the chain or not), queueInput (do the work), onFlush/onReset (drop state). Build the chain inside a DefaultRenderersFactory subclass's buildAudioSink override (protected there), so instances are created per player — once more than one is alive (a crossfade, a preroll, a precache), it matters, because a processor carries per-stream state and cannot be shared.

Installs
9
GitHub Stars
1.5K
First Seen
Aug 30, 2026