Yeah I guess that would work (although I'd prefer to properly detect when all the sound has died out, rather than than just waiting "a few seconds"). I hadn't thought of that.
But there's still something "dishonest" about being told (by the MIDI file) "this song ends right now," and FluidSynth going, "no it doesn't, it ends a little bit later." At the moment, FS ends the song precisely when it's told to -- if that cuts off the end, then it's the file's fault. This proposal would probably make a good feature, but I would want it to be an optional one that is off by default. That is: there is a good use case (I would use it myself) for overriding the MIDI file's EOT command and continuing to record until the last notes are truly dead, but it is just one use case.
For one thing, this would be a more common use case in the fast renderer (note: fast renderer was the original topic for this discussion but I think we're now talking more generally about the playback engine in all its modes), where we often want to produce a WAV file containing an entire song. But in other cases, such as if you were writing a game that dynamically switched tracks, you would probably want to receive the "end of song" callback as soon as the last EOT event hits (not when all the music dies out), and immediately begin playing the next track. (In this case, cutting off the notes wouldn't be an issue, because you aren't shutting down the synthesis engine.) So such a game would probably not use this option.