godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.64k stars 20.77k forks source link

AudioStreamOGGVorbis ignores the loop property and uses the import setting due to the saved resource not being able to store metadata #42671

Open vetu11 opened 3 years ago

vetu11 commented 3 years ago

Godot version:

3.2.3.stable

OS/device including version:

Manjaro Linux, 5.8.11-1-MANJARO

Issue description:

When using a .ogg, the loop property on AudioSreamOGGVorbis is only acknowledge by the editor, and the game uses instead the loop option set when importing the file.

Steps to reproduce: Add a AudioStreamPlayer with a .ogg file.

Play the audio on the editor. It will loop depending on the AudioSreamOGGVorbis loop property.

Play the audio on the game. It will loop depending on the loop value in the import settings.

Minimal reproduction project:

OGGLoopPreferenceBug.zip

Related to:

40694

May be related to:

40359

KoBeWi commented 3 years ago

This is the same problem textures had in the past. The thing is that you can't edit properties of imported resources - you have to change their import settings. Textures had a warning for that and now seems like their properties are hidden entirely. Same should be done for audio streams probably.

Calinou commented 3 years ago

Related to https://github.com/godotengine/godot/issues/35314. See also https://github.com/godotengine/godot/issues/28537 which is the same bug but with a different resource type.

paddy-exe commented 2 years ago

I can confirm that this still happens in the RC6 version of Godot 3.5: v3.5.rc6.official [f05cecdc4]

Minimal reproduction project:
AudioImportBug.zip

Calinou commented 2 years ago

Note that this will be fixed by https://github.com/godotengine/godot-proposals/issues/3120 if it's implemented.

paddy-exe commented 2 years ago

@Calinou This won't be backported to 3.5 though it seems, will it? It seems like a completely overhauled feature set so probably just for 3.6?

Calinou commented 2 years ago

@Calinou This won't be backported to 3.5 though it seems, will it? It seems like a completely overhauled feature set so probably just for 3.6?

It's a compatibility-breaking change, but I'm not sure if there's any way to fix this without breaking compatibility. It's like DynamicFontData in 3.x not being able to store antialiasing and hinting properties unless you save it to a .tres or .res file.