mirror of
https://github.com/androidx/media.git
synced 2025-05-09 08:30:43 +08:00

This change introduces `GainProcessor` to apply gain automation over an audio stream. The gain automation is defined with a `GainProvider`. `DefaultGainProvider` implements a basic `GainProvider` that allows populating a gain automation line additively by adding fade shapes (`FadeProvider`) at specific positions with specific durations. `DefaultGainProvider` also implements basic equal gain and equal power fades. The current `DefaultGainProvider` implementation does not support adding fades at relative offsets from the stream end. Users must know the stream duration in advance and add fades at absolute positions. PiperOrigin-RevId: 733311314