I have to constantly adjust the volume, especially to turn down ads and loud action scenes or dramatic soundtrack swells in video, but turn up to keep dialog audible, etc. I need something that does this automatically, like a dynamic compressor/limiter/normalizer. If apps are available for this, I prefer those that are free and don't require root. I am also open to guidance in writing an app to do this myself.
I have searched the google play store and found nothing with this feature system-wide. Some media players/streamers have it built in just for their own content (probably excluding ads, usually to handle songs mastered to different levels), sometimes called something like "smart volume." There are many apps that process audio files offline and add a "replay gain" to their metadata, which some media players respect. I'm looking for the same kind of thing, but applied to all media audio output in real time, including ads.
Googling indicates that viper4android may work, but it requires root and I can't find a definitive statement that it has this feature, and it looks like it doesn't easily install on some devices. If it does and is the only option, I would consider rooting.
A great option would be if Android could run LADSPA plugins like Linux. Is this possible?