Unity Stop All Audio

// unity stop all sound by yasin
 private var allAudioSources : AudioSource[];
  
 function Awake() {
     allAudioSources = FindObjectsOfType(AudioSource) as AudioSource[];
 }
  
 function StopAllAudio() {
     for(var audioS : AudioSource in allAudioSources) {
         audioS.Stop();
     }
 }
Yasin