> For the complete documentation index, see [llms.txt](https://man572142s-organization.gitbook.io/broaudio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://man572142s-organization.gitbook.io/broaudio/core-features/library-manager/design-the-sound/seamless-loop.md).

# Looping

## Introduction <a href="#introduction" id="introduction"></a>

Looping allows an [AudioClip](https://docs.unity3d.com/Manual/class-AudioClip.html) to be continuously replayed. It's a common technique used for playing sounds such as **Music** and **Ambience** in games. However, if a sound is not specifically designed for looping, its beginning and end might not match seamlessly. Direct replay would result in a noticeable change.

This is where **SeamlessLoop** comes in. It enables an [AudioClip](https://docs.unity3d.com/Manual/class-AudioClip.html) to start playing again on a new audio track just before the current one finishes. By gradually [cross-fading](/broaudio/core-features/library-manager/design-the-sound/fade-in-out-and-cross-fade.md#crossfade) between the two tracks, it creates an illusion that the sound never stops at all.

## **How To Use?**

You can find the **Looping** option in the 'Overall' tab of an AudioEntity. If one of the looping options is selected, the AudioEntity will play accordingly.\
[<mark style="color:blue;">Didn't see the option?</mark>](#user-content-fn-1)[^1]

<figure><img src="https://886210201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfI79StJ3o7OKZxf9vHhb%2Fuploads%2FntWz0dHfR4oOL1cauuE8%2FSeamlessLoop.png?alt=media&amp;token=4149f7a4-4313-4975-8581-8b1835dca0d6" alt=""><figcaption></figcaption></figure>

### Loop

The sound will replay when it's finished.

### Seamless Loop

The sound will replay **before** it ends.

If this option is selected, "Seamless Setting" will appear, allowing you to set the transition timing.

1. **Clip Setting:** The replay begins as the clip starts fading out.
2. **Time:** The replay starts a specified number of seconds before the end.
3. **Tempo:** The replay starts a specified number of beats before the end.

### Change Clip Per Loop

When an AudioEntity has more than one clip and either **Loop** or **Seamless Loop** is enabled, a **Change Clip Per Loop** toggle appears below the looping options.

Enable it to pick a new clip on every loop iteration, following the entity's [Play Mode](/broaudio/core-features/library-manager/design-the-sound.md#playmode) (e.g. Random or Shuffle), instead of repeating the same clip. This is handy for varied ambiences or evolving loops without authoring a single long clip.

{% hint style="info" %}
Volume changes made through `IAudioPlayer.SetVolume()` are carried across each loop, so fades stay smooth even when the loop transitions between clips or audio tracks.
{% endhint %}

[^1]: If you can't see this option, it might be because the GUI setting of this AudioType is set to be invisible. [Click here for more details.](/broaudio/core-features/customization.md#displayed-properties)
