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

yield AudioStreamPlayer finished signal on html export not working #43040

Open
Tracked by #76797
dpensky opened this issue Oct 23, 2020 · 1 comment
Open
Tracked by #76797

yield AudioStreamPlayer finished signal on html export not working #43040

dpensky opened this issue Oct 23, 2020 · 1 comment

Comments

@dpensky
Copy link

dpensky commented Oct 23, 2020

I have this code:

$background.stop()

yield($background, "finished")

emit_signal("game_load_requested", game_name)

that works perfectly on the engine and the signal is emitted after the sound stops.

however when I export to html, the signal is emitted immediately, before the sound stops.

is this an engine problem or what am i doing wrong?

$background is a AudioStreamPlayer with a ogg file playing on loop

tanks in advance

@Chlipouni
Copy link

Chlipouni commented Dec 28, 2020

I have the same problem in my project (v3.2.4.beta4.official).
In desktop mode, the sound is played once and the "finished" signal is emitted at the end.
In hmtl5 export, the sound is played indefinitely (in loop mode) and the "finished" signal is not emitted (may be the correct behaviour in this case).
To obtain the same behaviour in both cases, it is necessary to set the "loop" property to "false" explicitly (for the "AudioStreamOGGVorbis" instance).
It seems that the default value of the "loop" property is not the same in Html5 exports.

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

No branches or pull requests

3 participants