How does Godot decide to loop some audio sources but not others?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DrunkenUFOPilot

I in the 2D game tutorial https://docs.godotengine.org/en/stable/getting_started/step_by_step/your_first_game.html, near the end, adding audio. I added both the ongoing background music, and the Game Over sound. What puzzles me is why the background music repeats forever while the Game Over sound is one-time. I did not find or click a loop checkbox anywhere. There is no gd script code to make the one loop.

How does Godot know to loop the one and not the other?

Perhaps an explanation could be added to the tutorial page.

:bust_in_silhouette: Reply From: kidscancode

Looping is an import property of the audio resource. To change it you need to go to the “Import” tab.

OGG files are imported with looping enabled by default, and wav files import without by default.

Where I can change these default settings?

Lebostein | 2021-10-03 16:17

Lebostein: As of Godot 3.3, you can change the default audio settings using the Import Defaults tab in the Project Settings.

Note that looping is always enabled for WAV files if they contain loop points. If this is a problem, you can use third-party tools such as Audacity to remove loop points from the WAV file.

Calinou | 2021-10-03 23:36