No, locking your Mac does not mute the sound. Any ongoing sounds or media will continue to play.