garrysmod-chatsounds
garrysmod-chatsounds copied to clipboard
adding a sound volume property for the postprocessor
This is something I've been thinking for a while. When the preprocessor runs it gets the length of the soundsample, wouldn't it be also useful to have other information as well? For example sample-volume (or similar) so you could filter all sounds by volume and potentially, for instance, filtering out loud sounds locally.
Having an existing setup (i.e. the preprocessor) that inspects all files makes it easy(-ish) to further enhance it. I've always thought about what else might be useful other than just the duration itself. I'll look into volume/gain analysis and report back as to how easy it would be.
Ok, apparently it might be possible with just ffmpeg/libav.
To be specific, libavfilter's loudnorm filter seems to be able to do what we'd be interested in, but I have no idea how to use it.
Using a separate lib would be an idea, or just slapping standard ReplayGain on all files and transferring that to the lists.
Needs more investigation.
or eventually calculate it yourself with a RMS measurement.
can we not cap the ^ to the listening client? Would not remove loud annoying sounds but it would at least prevent my ears from exploding