How do I turn off sound effect while still playing background music efficiently?

Hey guys the question says it all but I’ll go a little more in depth here. I have figured out how to get my music to not play if the player chooses to turn off music in the options menu. How do I get the sounds not to play efficiently?

Right now my LevelManager holds the music clip and plays it depending on the GameManagers playMusic boolean. I have the same boolean for playSound. Sorry for the sudo code. I’m at work waiting for my computer to finish something.

Right now I have this:

BulletClass: PauseableObject {
    void Start() {
    //sound get initialized here
    if(GameObject.Find("GameManager").GetComponent<GameManager>().playingSound == true){
        audio.Play();
        }
    }

Use at least two audio sources, one for music and one for effects. (You can actually have a lot more audio sources than that, and have the fx sources set their volume to whatever the controller object says the fx volume should be.)

This post is very old. For those who google it out now: you should use audio mixers. Do group for music and a group for effects and then expose volumes as float. You can even create two mixers, one form music and one for sound fx. More here: Audio Mixing - Unity Learn