示例#1
0
 public void PlayOneShot(AudioClip clip, [UnityEngine.Internal.DefaultValue("1.0F")] float volumeScale)
 {
     if (clip != null && clip.ambisonic)
     {
         AudioSourceExtension audioSourceExtension = AudioExtensionManager.AddAmbisonicDecoderExtension(this);
         if (audioSourceExtension != null)
         {
             AudioExtensionManager.GetReadyToPlay(audioSourceExtension);
         }
     }
     this.PlayOneShotHelper(clip, volumeScale);
 }
示例#2
0
        internal static void InvokeOnAudioSourcePlay(AudioSource source)
        {
            AudioSourceExtension audioSourceExtension = AudioExtensionManager.AddSpatializerExtension(source);

            if (audioSourceExtension != null)
            {
                AudioExtensionManager.GetReadyToPlay(audioSourceExtension);
            }
            if (source.clip != null && source.clip.ambisonic)
            {
                AudioSourceExtension audioSourceExtension2 = AudioExtensionManager.AddAmbisonicDecoderExtension(source);
                if (audioSourceExtension2 != null)
                {
                    AudioExtensionManager.GetReadyToPlay(audioSourceExtension2);
                }
            }
        }