ONSPAudioSource.cs
, found in Assets/Oculus/Spatializer/scripts
, to an AudioSource. This script accesses the extended parameters required by the Oculus Native Spatializer. Note that all parameters native to an AudioSource are still available, though some values may not be used if spatialization is enabled on the audio source.Note: It is important that all sounds passed to Oculus Spatializers are monophonic - stereophonic rendering will be handled by our spatialization, and must not be applied over additional stereophonic rendering provided by your game engine or library.
Property | Description |
---|---|
Spatialization Enabled | Select to enable. If disabled, the attached Audio Source will act as a native audio source without spatialization. This setting is linked to the corresponding parameter in the Audio Source expandable pane (collapsed in the preceding image). |
Reflections Enabled | Select to enable early reflections for the spatialized audio source. To use early reflections and reverb, you must select this value and add an OculusSpatializerReflection plugin to the channel where you send the AudioSource in the Audio Mixer. See Audio Mixer Setup below for more details. |
Gain | Adds up to 24 dB gain to audio source volume (in db), with 0 equal to unity gain. |
Oculus Attentuation Enabled | If selected, the audio source will use an internal attenuation falloff curve controlled by the Minimum and Maximum parameters. If deselected, the attenuation falloff will be controlled by the authored Unity Volume curve within the Audio Source Inspector panel. Note: We strongly recommend enabling internal attenuation falloff for a more accurate rendering of spatialization. The internal curves match both the way the direct audio falloff as well as how the early reflections are modeled. For more information, see the Attenuation and Reflections section in the feature guide. |
Attenuation Range: Minimum | Sets the point at which the audio source amplitude starts attenuating, in meters. It also influences the reflection/reverb system, whether or not Oculus attenuation is enabled. Larger values will result in less noticeable attenuation when the listener is near the sound source. |
Attenuation Range: Maximum | Sets the point at which the audio source amplitude reaches full volume attenuation, in meters. It also influences the reflection/reverb system, whether or not Oculus attenuation is enabled. Larger values allow for “loud” sounds that can be heard from a distance. |
Volumetric Radius | Expands the sound source to encompass a spherical volume up to 1000 meters in radius. For a point source, set the radius to 0 meters. This is the default setting. |
Reverb Send Level | Sets the gain for the reverb for a single sound source. Larger values will make a sound more reverberant, lower values will make it sound more “dry” or anechoic. |
OculusSpatializerReflection
plug-in effect to that channel.Property | Description |
---|---|
Global Scale | The spatializer expects positional values in meters. Use this field to adjust the spatializer scale for applications with different scale values. For example, for an application with unit set to equal 1 cm, you would set the Global Scale value to 0.01 (1 m = 100 cm). Note that Unity defaults to 1 meter per unit. |
Enable Early Reflections | Select to enable the early reflection system. For more information, see Attenuation and Reflections in the feature guide. |
Enable Reverberation | Select to enable global reverb, based on room size. Requires Early Reflections to be enabled. |
Room Dimensions: Width / Height / Length | Sets the dimensions, in meters, of the room model used to calculate reflections. Range is 0-200 m. The greater the dimensions, the further apart the reflections. |
Wall Reflection Coefficients (Left/Right/Up/Down/Back/Front) | Sets the percentage of sound reflected by each respective wall. At 0, the reflection is fully absorbed. At 1.0, the reflection bounces from the wall without any absorption. The max value is 0.97 to avoid feedback. |
Shared Reverb Wet Mix | Sets additional gain applied to the reverb of all sound sources. Larger values will make the reverb louder and make everything more reverberant. |
Propagation Quality Level | Controls the quality of the propagation simulation. Lower values consume less CPU, but could be unstable and produce a less consistent reverb response. The required quality setting depends on the type of environment. For example, an open complex, asymmetrical environment with lots of small objects, such as a forest, would require a higher quality level. In contrast, a simple, enclosed environment with large flat surfaces, such as a dungeon can be modeled sufficiently at a lower quality level. |
vocal1
is set to our Master (SpatializerMixer):