ObjectAudioComponent

constructor()

The default constructor for ObjectAudioComponent with no parameters.


constructor(@FloatRange(from = 0.0, to = 1.0) volume: Float = 1.0f, directivity: Directivity = Directivity(0.0f, 0.0f), distanceAttenuationMode: DistanceAttenuationMode = DistanceAttenuationMode.INVERSE_SQUARED, reverbVolume: Float = 1.0f)

Creates a new ObjectAudioComponent with volume, directivity. If volume, directivity is invalid, it will use default value instead to create the ObjectAudioComponent.

Parameters

volume

The volume of the audio. The valid value range is [0.0, 1.0]. The default value is 1.0f. If the specified value is not in the valid range, the default value will be used.

directivity

The directivity of the audio. The valid value range is ([0.0, 1.0],[0.0, ∞]). The default value is (0.0,0.0). If the specified value is not in the valid range, the default value will be used.

distanceAttenuationMode

The distance attenuation mode for audio. The default value is DistanceAttenuationMode.INVERSE_SQUARED.

reverbVolume

The reverb volume level of the audio. The valid value range is [0.0, 1.0]. The default value is 1.0f. This property only takes effect when VST (Video SeeThrough) is enabled.