I just don't see an "pat" answers to this. Eventually you've got to announce yourself somehow. If you rack the slide, they're probably either going to beat feet or shoot at the sound. If you don't know for sure how many there are or where they are, I don't see any downside to using the sound to flush them out, as long as you keep moving.
if you feel the need to announce yourself, do it by throwing something into the room to draw their attention AWAY from you...