It also would be pretty easy to change voladj_check to calculate a desired multiplier based on the average power,
Turns out I was right, it was pretty easy. So what if it took 15 years of turning the idea round in my head to actually do anything about it? New versionTL;DR:
Try these two settings in your config.ini to compare power to peak scaling:
med is peak scaling, high is power scaling.Details:
In this version the "headroom" parameter is overloaded - if it's less than or equal to 1 (0x1000) then the scaling is based on peak sample, as in the olden days.
If you set it greater than 1 (say 0x4000) then scaling based on RMS of sample size is used (as a full buffer of samples of that size give the same energy the actual buffer) and the headroom parameter is used as a multiplier to convert from the RMS value to the peak value.
Why even do this multiplier thing? The main reason is that I still want to avoid clipping, and if we just used the raw RMS value then the algorithm would always be in clipping avoidance mode. It also means that the silence values are a bit more comparable, and the venerable fixed point routines don't lose most of their resolution.
If you want to tweak the parameters, I suggest that you might try headroom between 0x3000 and 0x5000, and leave the silence parameters around 30,60. If you increase headroom higher than that, it's probably sensible to increase the silence values. A good rule of thumb would be to multiply them by headroom/0x4000. (My example above has headroom=0x8000, and the silence values both multiplied by two.)
I have tested this a little bit on the command line, and hardly at all on the player. But feel free to download and have a go.