public void PlayAudioOnEvent() // call this function on corresponding event
 {
     if (!playedThisFrame)
     {
         audioPlayer.PlayIncomingSource(audioClip);
     }
     // play audio when corresponding event is called.
 }