The OP basically wants to know how do you get a sound decoder in s steam loco to sound like a steam loco, and the same sound decoder in a diesel locomotive to sound like a diesel.
Your premise is correct - decoders are not loco specific. There are exceptions, more common in N scale, where the decoder repalces a factory lighting board, and different loco manufactures use different boards, thus different decoders are needed based on the brand and sometimes specific model of the loco. But in HO or larger, you can generally use anything that will fit physically in the loco. Sometimes there are options that are easier than others, but I am one of those who tends to remove any factory circuit board and directly wire my decoders. SO bascially you are correct - you do not need different decoders for an Atlas loco vs an Athearn loco vs a Bowser loco etc.
The sound is a different story. As has been mentioned, some sound decoders come with a fixed set of sounds and that's what you get. Manufacturers of such offer different decoders. One may have Alco sounds, another EMD first generation sounds, another medium size steam engine sounds, etc. All the decoders may look alike, but each has specific sound files loaded into the internal memory.
Others allow the loading of sounds by the end user. Every one of these uses a proprietary method of loading the sound files, because the NMRA DCC programming specification is far too slow to transfer the amount of data required. These decoders typically come blank, or with some sample sounds installed to allow testing. Any of the major resellers will generally install your choice of sound files to the decoder when you buy it, so you don't need to have the proprietary hardware. If you want to change the sounds though, you need the specific programming ahrdware - say you ordered the decoder with Alco sounds, and you decided instead you want to install it in an EMD F7 you have sitting around. The decoder physically and electrically will work, but it will sound wrong. You would need the programming hardware, or else know someone who has it, to change the Alco sounds to EMD sounds. The upside to this is that you can get a handful of deocders and then install them and load the sounds you need at the time.
The big difference between fixed sound and user programmable ones is that the fixed sound vendor makes say 100 decoders, they make 10 each of 10 different sounds. The programmable decoder manufacturer just makes 100 decoders because the buyer can load whatever sounds they want. Though what really happens is that the fixed decoder manufacturer makes 100 decoders and then loads sounds in using a method they have not made available to the general public. End result though is the same, if your retailer is out of stock of the Alco version and you wanted to install a decoder in your Alco model, you're out of luck and have to wait until they replenish stock.
There is also an extreme you can take the user-loadable sound decoders - and that is to produce your own sounds. Most of us don't have access to a real railroad or the equipment required to get good sound recordings, let alone the skills to edit and mix the results to something usable in the decoder, so this isn't exactly a driving feature of these decoders, but it's there. I happen to have a couple of the PCM models of the Reading T1 4-8-4. These came with ESU Loksound decoders, which belong to the end user loadable set of sound decoders. A fellow model railroader happened to have good audio recordings he made in 1976 of American Freedom Train #1 - in the Northeast US this was former Reading T1 2101. He was able to filter out certain of the sounds to replace the ones supplied by PCM/ESU from the factory. I didn't use his whistle, as AFT #1 used a passenger whistle and my models represent in-service units which had a completely different whistle for freight service, but I did use his bell and the aux sounds (air pump, air leftoff, etc) so my models now sound a little more liek the real thing. I also loaded this for a couple of people at the club who had the same model.
--Randy