> For the complete documentation index, see [llms.txt](https://bonsai-docs.gitbook.io/bonsai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bonsai-docs.gitbook.io/bonsai-docs/bonsai-radio/configuration/world-audio.md).

# World Audio

## World Audio

World Audio allows nearby players outside a vehicle to hear its radio.

The settings can be found inside:

```lua
Config.WorldAudio
```

in `config.lua`.

***

## enabled

```lua
enabled = true
```

Enables or disables exterior positional radio audio.

| Value   | Description                                   |
| ------- | --------------------------------------------- |
| `true`  | Nearby players can hear vehicle radios.       |
| `false` | Radio audio is only heard inside the vehicle. |

***

## requiresEngine

```lua
requiresEngine = false
```

Controls whether the vehicle engine must be running before World Audio can be heard.

| Value   | Description                                                  |
| ------- | ------------------------------------------------------------ |
| `true`  | Exterior radio audio only works while the engine is running. |
| `false` | Exterior radio audio can play while the engine is off.       |

***

## maxDistance

```lua
maxDistance = 28.0
```

The maximum distance, in metres, that players can hear the radio.

At or beyond this distance, the audio is removed.

This value must be higher than `0`.

***

## fullVolumeDistance

```lua
fullVolumeDistance = 3.0
```

Controls how close a player must be to hear the radio at full exterior volume.

After this distance, the volume begins fading until it reaches `maxDistance`.

Keep this value lower than `maxDistance`.

***

## outsideVolume

```lua
outsideVolume = 0.55
```

Controls the base volume of the radio outside the vehicle.

This value is applied before distance fading and sealed/open vehicle processing.

Examples:

| Value  | Result                  |
| ------ | ----------------------- |
| `1.0`  | Full exterior volume    |
| `0.75` | 75% exterior volume     |
| `0.55` | Default exterior volume |
| `0.25` | Quiet exterior volume   |

***

## updateInterval

```lua
updateInterval = 150
```

How often World Audio updates while the camera or nearby radio vehicles are moving.

Measured in milliseconds.

Lower values update more frequently but use more resources.

***

## stationaryUpdateInterval

```lua
stationaryUpdateInterval = 300
```

How often World Audio updates while the scene is stationary.

Measured in milliseconds.

A higher stationary interval helps reduce unnecessary NUI traffic while nothing is moving.

***

## movementThreshold

```lua
movementThreshold = 0.12
```

Controls how far the camera or vehicle must move before the scene is treated as moving.

Measured in metres.

***

## maxEmitters

```lua
maxEmitters = 10
```

The maximum number of nearby vehicle radios processed by each player.

The nearest radios are prioritized.

Set this to:

```lua
maxEmitters = 0
```

to remove the limit.

{% hint style="warning" %}\
Using unlimited emitters may increase resource usage in areas with many vehicles.\
{% endhint %}

***

## Default Configuration

```lua
Config.WorldAudio = {
    enabled = true,
    requiresEngine = false,
    maxDistance = 28.0,
    fullVolumeDistance = 3.0,
    outsideVolume = 0.55,
    updateInterval = 150,
    stationaryUpdateInterval = 300,
    movementThreshold = 0.12,
    maxEmitters = 10
}
```

***

## World Audio Processing

The sound heard outside the vehicle is also affected by:

```lua
Config.WorldAudioProcessing
```

This controls how the exterior radio changes when:

* Windows are open or broken
* Passenger doors are open
* A convertible roof is open
* The vehicle is fully sealed

The sealed and open sound settings are covered separately in the **World Audio Processing** documentation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bonsai-docs.gitbook.io/bonsai-docs/bonsai-radio/configuration/world-audio.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
