AudioOccluder Class

Definition

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

C++
public ref class AudioOccluder : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Audio::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

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

Product Versions
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0