Suffering through OPS (Obsolete Part Syndrome) is all we do here at GroupDIY.
For me it is while working on Marantz stuff.
Obviously you want the same sound, you hope for more dependability from a newer part and you want it cheap and to hopefully have the same pinout so you do not blow something else up.
Tall order. Usually a compromise.
What to do?
First thing is pull up a datasheet.
Power rating should be the same or a bit higher.
Vceo voltage need not be a perfect match, you can use the same voltage or higher.
Collector current rating should be the same or higher, but to a limit. You do not want a transistor with 1 amp collector current replacing a 40 ma transistor.
For one thing, the package will most likely be bigger.
Second, the sound might change.
Then you have gain. If there is negative feedback involved, then having the exact gain transistor might not be necessary.
You may want to match gain if using more than one transistor, such as in a differential pair. Once again, this will probably depend on the exact circuit being used. I like to match diff pairs no matter what, that way i do not worry about it. And it keeps the left and right channels on a stereo matched up unless the dual volume pot is off, which it usually is.
And as mentioned, watch out for the "a,b,c" thing after the part number as it can designate gain.
Last thing to worry about is frequency response.
Propeller heads call this Current gain bandwidth , switching time, slew rate, etc.
If the new part is too fast, you might have amplifier stability problems.
You can compensate for this if you know how, usually it involves the placement of small capacitors in a way that will not cause more problems,
Noise is also a consideration. That is the usually the best thing about using a modern replacement, you get a better noise figure.
A number for noise is not always given on the data sheet, it might be mentioned in the description of the part.
This is where an online forum can be useful. people who have gone through the same thing can steer you to a low noise part.
For the Marantz stuff we use a lot of KSC and KSA parts, like KSC 1845 and KSA 1015 as they have a rep for low noise and good sound.
You can find your own match by going to the DigiKey website and picking the parameters off the search engine.
Some audio pieces garner more attention when it comes to choosing parts, probably one of the best examples of this is the UREI 1176 compressor. We have had a couple of bar room brawls over a stash of Toshiba 2SK170's, jus kiddin.