/// <summary> /// Initializes a new instance of the <see cref="SunBurnSound"/> class. /// </summary> /// <param name="nativeSound">The native sound.</param> public XenkoSound(object nativeSound) : base(nativeSound) { sound = nativeSound as Sound; if (sound != null) { soundInstance = sound.CreateInstance(); } }
/// <summary> /// Create an new instance of underlying sound, and register it in the controller's sound instance list. /// </summary> /// <returns>The new sound effect instance created</returns> internal SoundInstance CreateSoundInstance(AudioListenerComponent listener) { var newInstance = sound.CreateInstance(listener.Listener); InstanceToListener.Add(newInstance, listener); listener.AttachedInstances.Add(newInstance); return(newInstance); }
/// <summary> /// Create an new instance of underlying sound, and register it in the controller's sound instance list. /// </summary> /// <returns>The new sound effect instance created</returns> internal SoundInstance CreateSoundInstance(AudioListenerComponent listener, bool forget) { var newInstance = sound.CreateInstance(listener.Listener, false, emitter.UseHRTF, emitter.DirectionalFactor, emitter.Environment); if (!forget) { InstanceToListener.Add(newInstance, listener); } return(newInstance); }
/// <summary> /// Create an new instance of underlying sound, and register it in the controller's sound instance list. /// </summary> /// <returns>The new sound effect instance created</returns> internal SoundInstance CreateSoundInstance(AudioListenerComponent listener, bool forget) { var newInstance = sound.CreateInstance(listener.Listener); if (!forget) { InstanceToListener.Add(newInstance, listener); } return(newInstance); }