The reverberation RealityKit applies to spatial audio sources.
You can configure the reverb for spatial audio sources in your RealityKit content with the ``ReverbComponent``.
```swift
let cinema = Entity()
let reverb: Reverb = .preset(.mediumRoomDry)
cinema.components.set(ReverbComponent(reverb: reverb))
```
Returns a reverb instance that you can set on a reverb component.
- Parameter preset: A reverberation preset.
- Returns: Reverb that can be set on a ``ReverbComponent``.
get · iOS 18.0+
anechoic
TypeScript
static get anechoic(): Reverb
Swift declaration
static let anechoic: Reverb
A reverb instance that applies no reverberation to spatial audio sources.
- Warning: ``Reverb/anechoic`` will cause spatial audio sources to lose externalization,
or the sense that an audio source is in a person's space. Only use this case when when the immersive
environment is abstract or otherwise unrealistic.
A reverb that is simulated from a reverb mesh and materials.
Use this factory method to create a reverb that ray-traces acoustic geometry at runtime,
simulating how sound reflects through the space defined by the mesh:
```swift
entity.components.set(
ReverbComponent(reverb: .simulated(mesh: roomMesh, materials: [.concrete, .carpet, .glass]))
)
```
As spatial audio sources move through the space, the reverb updates dynamically —
reflections tighten near walls and open up in larger areas.
- Parameters:
- mesh: The reverb mesh resource that defines the acoustic geometry of the space.
- materials: An array of audio materials that define how each surface absorbs and
scatters sound. Each element corresponds to a material index in the mesh. Defaults to
``Audio/Material/default``.
- Returns: A reverb configured for runtime acoustic simulation.