Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set looping on OGGVorbis default import options to false #51529

Conversation

MichaelShaulskiy
Copy link

@MichaelShaulskiy MichaelShaulskiy commented Aug 11, 2021

This was a cause of confusion for me when I was participating in a game jam.
Although I had disabled looping on the AudioStreamPlayer2D node, this change had no effect.

I discovered that the OGG import settings where to blame which have looping turned on by default.

First off all, this option shouldn't even exist. Looping should be controlled by the AudioStreamPlayer only and not be inherent to a resource.
Me and according to google many others had encountered a "bug" where a sound, that shouldn't be looping was looping despite looping being turned of in the Node.

Instead of removing it outright right now, maybe it should be turned off by default to not break any projects.

Bugsquad edit: This closes godotengine/godot-proposals#3120.

@Calinou
Copy link
Member

Calinou commented Aug 11, 2021

Instead of removing it outright right now, maybe it should be turned off by default to not break any projects.

This default setting change will still break projects that rely on the existing behavior. Therefore, it can only be considered for 4.0. I would recommend opening a proposal for this too, so we can see whether this gathers sufficient community support.

The reason OGG files loop by default is that they're generally used for background music and ambient sounds, which are expected to be looped. For sound effects, it's better to use WAV files as they use up less CPU resources when played back. On the other hand, it's unlikely that WAV is used for background music or ambient sounds due to the high file size. This is why looping is disabled for WAV files by default.

@reduz
Copy link
Member

reduz commented Jul 30, 2022

I think given music looping is more involved and will require the BPM setting, we should set this flag by default to off now.
Feel free to rebase this, also should be applied to the mp3 importer.

@akien-mga
Copy link
Member

Superseded by #71858.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move Loop from an import option to a property in the AudioStreamPlayer nodes
4 participants