Summary
We started this chapter by presenting different types of files that Godot uses for playing sound. Knowing the differences among these formats, when you work with composers, you can emphasize in which format you want your sound files to be delivered. Chances are they might ask you about this, and they might even deliver in all three possible formats.
Next, we discussed a few cases where looping a sound file might be a good idea. To facilitate this, we investigated the options presented in the Import panel. However, the decision to loop or not is still something you’ll have to decide.
Finally, to put our theoretical knowledge to use, we created two scenes that could play the sample files. In the first case, we attached a sound file to an audio streamer and let it play automatically. For the second case, we wrote a very simple script that let you start and stop the sound to mimic an enemy character’s behavior, hence the sound effect it may make.
So far,...