<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/SpatialAudioComponent/init(gain:directLevel:reverbLevel:directivity:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation21SpatialAudioComponentV4gain11directLevel06reverbH011directivityACSd_S2dAA0D0O11DirectivityOtcfc"
  },
  "title" : "init(gain:directLevel:reverbLevel:directivity:)"
}
-->

# init(gain:directLevel:reverbLevel:directivity:)

Creates a spatial audio component from a gain value, a direct level, a reverb level,
and a directivity value.

```
init(gain: Audio.Decibel = .zero, directLevel: Audio.Decibel = .zero, reverbLevel: Audio.Decibel = .zero, directivity: Audio.Directivity = .beam(focus: .zero))
```

## Parameters

`gain`

The overall level for all sounds that an entity emits.

`directLevel`

The level of the direct unreverberated signal that an entity emits.

`reverbLevel`

The level of reverberated signal that an entity emits.

`directivity`

The radiation pattern for sound that an entity emits.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)