> For the complete documentation index, see [llms.txt](https://ss3d.gitbook.io/systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ss3d.gitbook.io/systems/audios.md).

# Audios

In SS3D, audio uses a single class to manage most sounds, it's the audio system.

The audio system handles creating and destroying audio sources, putting those sources on the right game objects and syncing sound between clients.

In the vast majority of cases, you should never add an audio source yourself to a game object, but instead you should use the audio system.

One of its perk is that it's reusing already existing audio sources that are not playing anymore, instead of adding a new source everytime something needs to play a sound.

It's also maintaining an healthy amount of audio sources by limiting the maximum amount allowed on a single client.

## Syncing sound&#x20;

It should be noted that in order to sync sound between clients, the audio system put audio sources on game object with a network object component. This is an easy way to find the same game object on the client. However, a restriction of that solution is that you should not put more than one audio source per network object.

## Purging sound

After a while, if no sound is played, an audio source gets destroyed. This is better for performances.


---

# 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://ss3d.gitbook.io/systems/audios.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.
