How to know if Audio is Paused?

I’m sure I’m overlooking something really obvious and couldn’t find an answer around.

I have a generic list with all the audio in the game :

var worldAudioSources : List.<AudioSource>;	//List of all audio sources in the game

And this is what I do when the player pauses:

	for (var audio : AudioSource in worldAudioSources){
		if (audio.isPlaying){
			audio.Pause();
		}
	}

My problem is when I want to unPause ONLY the audio that is paused, but there doesn’t seem to be a audio.isPaused?

	for (var audio : AudioSource in worldAudioSources){
		if (audio.isPaused){   //unfortunately doesnt exist
			audio.Play();
		}
	}

UPDATE1 (not the greatest):

This is the best I could find so far (knowing if the audio is at 0 or not):

	for (var audio : AudioSource in worldAudioSources){
		if (audio.time != 0){
			audio.Play();
		}
	}

UPDATE2 (best idea so far):
A good suggestion from jonbro5556. Since it was added as a comment I’m adding it here.

“I think what you actually need to do is store in a separate list all of the audio clips that need to get restarted:”

var toRestart : List.<AudioSource>;
 for (var audio : AudioSource in worldAudioSources){
	if (audio.isPlaying){
	   toRestart.Add(audio);
	   audio.Pause();
	}
 }

then:

 for (var audio : AudioSource in toRestart){
       audio.Play();
 }
 toRestart.Clear();

I’ve run into this problem as well. My solution was to create a Dictionary, where the Value of each Dictionary entry is the pause state of the AudioSource.

So I have code that looks something like this:

Dictionary<AudioSource, bool> pauseStates = new Dictionary<AudioSource, bool>();

// somewhere along the line add all your AudioSources to the dictionary,
// with their Values set to false
// pauseStates.Add(someAudioSource, false);

public void PauseAudio()
{
    foreach (AudioSource source in pauseStates.Keys)
    {
        pauseStates[source] = source.isPlaying;
        source.Pause();
    }
}

public void ResumeAudio()
{
    foreach (AudioSource source in pauseStates.Keys)
    {
        if (pauseStates[source])
        {
            source.Play();
        }
        pauseStates[source] = false;
    }
}

So basically what’s happening in the PauseAudio() function, if the source is currently playing, set its pause state to true. And then in the ResumeAudio() function, you only play the audio sources that were already paused.

you can just invert the boolean value is “isPlaying” like so:

    for (var audio : AudioSource in worldAudioSources){
       if (!audio.isPlaying){
         audio.Play();
       }
    }