---
title: "init(gain:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/ambientaudiocomponent/init(gain:)"
---

# init(gain:)

Configure the behavior of an ambient audio source.

## Declaration

```swift
init(gain: Audio.Decibel = .zero)
```

## Parameters

- `gain`: The overall level for all sounds emitted from an entity.
