Resonance Audio Unity SDK API Reference

ResonanceAudioReverbProbe Class Reference

ResonanceAudioReverbProbe

Resonance Audio reverb probe component that acts as a sample point where the reverb properties are computed by casting rays that interact with surrounding geometries and collecting them back.

Summary

In addition, it allows the user to define a "region of application", where when the listener enters, the pre-computed reverb properties are applied.

Inheritance

Inherits from: MonoBehaviour

Public types

ApplicationRegionShape enum
Supported choices of the shape of regions of application.

Public attributes

boxApplicationRegionSize = Vector3.one
Vector3
Size of the box-shaped region of application, normalized with respect to scale of the game object.
onlyApplyWhenVisible = true
bool
Only apply the reverb properties if this probe is visible to the listener.
proxyRoomBackWall = ResonanceAudioRoomManager.SurfaceMaterial.Transparent
proxyRoomCeiling = ResonanceAudioRoomManager.SurfaceMaterial.Transparent
proxyRoomFloor = ResonanceAudioRoomManager.SurfaceMaterial.Transparent
proxyRoomFrontWall = ResonanceAudioRoomManager.SurfaceMaterial.Transparent
proxyRoomLeftWall = ResonanceAudioRoomManager.SurfaceMaterial.Transparent
The surface materials on the six walls of the proxy room in the {-x, +x, -y, +y, -z, +z}-directions.
proxyRoomPosition = Vector3.zero
Vector3
Proxy room related fields.
proxyRoomRightWall = ResonanceAudioRoomManager.SurfaceMaterial.Transparent
proxyRoomRotation = Quaternion.identity
Quaternion
The rotation of the proxy room in world space.
proxyRoomSize = Vector3.one
Vector3
The size of the proxy room in world space.
reverbBrightness = 0.0f
float
Reverb brightness modifier.
reverbGainDb = 0.0f
float
Reverb gain modifier in decibels.
reverbTime = 1.0f
float
Reverb time modifier.
rt60s = new float[] {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
float[]
The RT-60s of the reverb baked in this probe.
runtimeApplicationRegionShape = ApplicationRegionShape.Sphere
Which shape of regions of application to use at runtime to check whether the listener is inside.
sphereApplicationRegionRadius = 1.0f
float
Radius of the sphere-shaped region of application.

Public functions

GetScaledBoxApplicationRegionSize()
Vector3
Gets the size of the box-shaped region of application scaled by the transform.
GetScaledSphericalApplicationRegionRadius()
float
Gets the radius of the spherical region of application scaled by the transform.
SetProxyRoomProperties(ResonanceAudio.RoomProperties proxyRoomProperties)
void
Set proxy room properties.

Public types

ApplicationRegionShape

 ApplicationRegionShape

Supported choices of the shape of regions of application.

Public attributes

boxApplicationRegionSize

Vector3 boxApplicationRegionSize = Vector3.one

Size of the box-shaped region of application, normalized with respect to scale of the game object.

onlyApplyWhenVisible

bool onlyApplyWhenVisible = true

Only apply the reverb properties if this probe is visible to the listener.

proxyRoomBackWall

ResonanceAudioRoomManager.SurfaceMaterial proxyRoomBackWall =
      ResonanceAudioRoomManager.SurfaceMaterial.Transparent

proxyRoomCeiling

ResonanceAudioRoomManager.SurfaceMaterial proxyRoomCeiling =
      ResonanceAudioRoomManager.SurfaceMaterial.Transparent

proxyRoomFloor

ResonanceAudioRoomManager.SurfaceMaterial proxyRoomFloor =
      ResonanceAudioRoomManager.SurfaceMaterial.Transparent

proxyRoomFrontWall

ResonanceAudioRoomManager.SurfaceMaterial proxyRoomFrontWall =
      ResonanceAudioRoomManager.SurfaceMaterial.Transparent

proxyRoomLeftWall

ResonanceAudioRoomManager.SurfaceMaterial proxyRoomLeftWall =
      ResonanceAudioRoomManager.SurfaceMaterial.Transparent

The surface materials on the six walls of the proxy room in the {-x, +x, -y, +y, -z, +z}-directions.

proxyRoomPosition

Vector3 proxyRoomPosition = Vector3.zero

Proxy room related fields.

A proxy room is used to calculate real-time early reflections. The position of the proxy room in world space.

proxyRoomRightWall

ResonanceAudioRoomManager.SurfaceMaterial proxyRoomRightWall =
      ResonanceAudioRoomManager.SurfaceMaterial.Transparent

proxyRoomRotation

Quaternion proxyRoomRotation = Quaternion.identity

The rotation of the proxy room in world space.

proxyRoomSize

Vector3 proxyRoomSize = Vector3.one

The size of the proxy room in world space.

reverbBrightness

float reverbBrightness = 0.0f

Reverb brightness modifier.

reverbGainDb

float reverbGainDb = 0.0f

Reverb gain modifier in decibels.

reverbTime

float reverbTime = 1.0f

Reverb time modifier.

rt60s

float[] rt60s = new float[] {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}

The RT-60s of the reverb baked in this probe.

runtimeApplicationRegionShape

ApplicationRegionShape runtimeApplicationRegionShape = ApplicationRegionShape.Sphere

Which shape of regions of application to use at runtime to check whether the listener is inside.

sphereApplicationRegionRadius

float sphereApplicationRegionRadius = 1.0f

Radius of the sphere-shaped region of application.

Public functions

GetScaledBoxApplicationRegionSize

Vector3 GetScaledBoxApplicationRegionSize()

Gets the size of the box-shaped region of application scaled by the transform.

GetScaledSphericalApplicationRegionRadius

float GetScaledSphericalApplicationRegionRadius()

Gets the radius of the spherical region of application scaled by the transform.

In order to maintain the spherical shape, the maximum of the scales in three dimensions is used to scale the radius (similar to how Unity handles Sphere Collider).

SetProxyRoomProperties

void SetProxyRoomProperties(
  ResonanceAudio.RoomProperties proxyRoomProperties
)

Set proxy room properties.

Proxy rooms are estimated by the ray-tracing engine and passed back to be used in real-time early reflections.