AudioClipGroup.SourcesBeingPlayed C# (CSharp) Method

SourcesBeingPlayed() private method

private SourcesBeingPlayed ( ) : int
return int
    private int SourcesBeingPlayed()
    {
        int sourcesBeingPlayed = 0;
        foreach (AudioSource audioSource in AudioSources)
            if (audioSource.isPlaying)
                sourcesBeingPlayed++;

        return sourcesBeingPlayed;
    }