AudioOccluder Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.AddComponentMenu("Scripts/MRTK/SDK/AudioOccluder")>]
[<UnityEngine.DisallowMultipleComponent>]
type AudioOccluder = class
inherit MonoBehaviour
interface IAudioInfluencer
Public Class AudioOccluder
Inherits MonoBehaviour
Implements IAudioInfluencer
- Inheritance
-
UnityEngine.MonoBehaviourAudioOccluder
- Attributes
-
UnityEngine.AddComponentMenuAttribute UnityEngine.DisallowMultipleComponentAttribute
- Implements
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.
Cutoff |
Frequency above which sound will not be heard after applying occlusion. Setting this value to 22000.0 effectively disables the effect. |
Volume |
Percentage of the audio source volume that will be heard after applying occlusion. |
Apply |
Applies an audio effect. |
Remove |
Removes a previously applied audio effect. |
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 |