Pausing music and sounds when the game is paused

Hey, does anybody know how to have all music and sounds playing in-game to pause when the game is paused, and resume when the game is unpaused? I can't seem to figure it out myself. I'm using Mapbase code if that helps.