# Adding Audio Clips

{% hint style="info" %}

1. ScriptableObjects for audio can be created by "Right Clicking anywhere in the project panel > Create > Sound" or duplicating an already created SO.
   {% endhint %}

![](/files/xzSTdV6gO7LaR9Bo3iSl)

{% hint style="info" %}
2\. ScriptableObjects will all have specific settings that control the audio clip which is used, that you can change, the volume, pitch, variance and whether it can loop. All features of the default "AudioSource" component.&#x20;
{% endhint %}

![](/files/a5XOz6sU8r0OeEbnIRJ6)

{% hint style="info" %}
3\. In the **AudioManager** is good to add the size of the **Sounds** array to the number of sounds which will play within this system. By default it has 8 SO audio clips, these should be added to access them all.
{% endhint %}

![](/files/3dwED3POkrji388jR3jU)

{% hint style="info" %}
4\. In the S**afeController** - Look at the inspector and you'll see slots for each of the applicable SO which you create in the project panel, add any of these to the appropriate slots. This allows you to play that specific SO from the audio manager.
{% endhint %}

![](/files/dhjGFnaNeQgvmzy0URqE)

### **Referencing the Audio Manager**

{% hint style="info" %}
&#x20;Use the code, within your scripts to reference your sounds to play
{% endhint %}

```csharp
SafeAudioManager.instance.Play(VariableSound);
```


---

# Agent Instructions: 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:

```
GET https://speedtutoruk.gitbook.io/safe-system-doc/managers-explained/adding-audio-clips.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
