One idea I had was for audio analysis to fill a playback range for cross-fading that could be used.
That way the cross-fade code wouldn't really need any tuning.
The analyzer would just say "this song ends with 10 seconds of near silence, so transition before that."
It could even be settable based on the threshold volume, although that might be a little overkill.
I do have "Do not play silence" checked which does half of what we need but definitely helps.
Now we also need your logic "this song ends with 10 seconds of near silence, so transition before that."
AND an S-Curve fadeout for songs with audio at full volume until the end.
Just a thought on how you could implement this new option let's call it "Cross-fade (dB Threshold)":
EDIT:- S-Curve fadeout is always active and kicks-in at the number of seconds specified under track change similar to the existing Cross-fade setting.
- A user settable dB threshold value will trigger the cross-fade.
- A user settable (could be hard-coded) time window from the end of a song to check for the dB Threshold drop at the end of a song (5-20 Seconds) If hard coded I recommend 15 to 20 seconds.
For example:
Cross-fade (dB Threshold): 7 seconds
dB drop threshold value: -7 dB
Time Window for dB drop: 20 Seconds
Voila! No audio analysis needed and messing up with tags and I think this would address both scenarios of having songs with very long fadeouts or none at all!!