AudioOccluder Class

Definition

Class that implements IAudioInfluencer to provide an audio occlusion effect, similar to listening to sound from outside of an enclosed space.

public ref class AudioOccluder : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Audio::IAudioInfluencer
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/AudioOccluder")]
[UnityEngine.DisallowMultipleComponent]
public class AudioOccluder : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Audio.IAudioInfluencer
[UnityEngine.DisallowMultipleComponent]
public class AudioOccluder : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Audio.IAudioInfluencer
[UnityEngine.DisallowMultipleComponent]
[UnityEngine.AddComponentMenu("MRTK/Audio/Audio Occluder")]
public class AudioOccluder : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Audio.IAudioInfluencer
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/AudioOccluder")>]
[<UnityEngine.DisallowMultipleComponent>]
type AudioOccluder = class
    inherit MonoBehaviour
    interface IAudioInfluencer
[<UnityEngine.DisallowMultipleComponent>]
type AudioOccluder = class
    inherit MonoBehaviour
    interface IAudioInfluencer
[<UnityEngine.DisallowMultipleComponent>]
[<UnityEngine.AddComponentMenu("MRTK/Audio/Audio Occluder")>]
type AudioOccluder = class
    inherit MonoBehaviour
    interface IAudioInfluencer
Public Class AudioOccluder
Inherits MonoBehaviour
Implements IAudioInfluencer
Inheritance
UnityEngine.MonoBehaviour
AudioOccluder
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.DisallowMultipleComponentAttribute
Implements

Remarks

Ensure that all sound emitting objects have an attached AudioInfluencerController. Failing to do so will result in the desired effect not being applied to the sound.

Constructors

AudioOccluder()

Properties

CutoffFrequency

Frequency above which sound will not be heard after applying occlusion. Setting this value to 22000.0 effectively disables the effect.

VolumePassThrough

Percentage of the audio source volume that will be heard after applying occlusion.

Methods

ApplyEffect(GameObject)

Applies an audio effect.

RemoveEffect(GameObject)

Removes a previously applied audio effect.

Applies to