[Fixed] Sound\Music on channel is stopped condition return true before it is begin to play

When we play a sound or music on a channel and immediately after we want to check if the Sound or the Music on the channel is stopped then do something, the condition return true and fire the actions even before the sound and music actually begin to play.

I think what is happening is that, at the very first few frames when the sound and music file is still loading and nothing is playing, the condition may think “hey nothing is playing so it must be stopped” and the condition return true.

If this is the case,I think it is a not optimal behaviour.
The problem is that it makes the condition completely useless on it own and require additional conditions like a timer for example to wait 1 second before checking if the audio or music is stopped to make it actually work.

What I would expect to happen, the condition should wait for a sound and music to actually being played on the specified channel and then wait for it to stop on the specified channel.
If there is any error and the sound and music can not be loaded and played, then it should never return true, because it is never played and there was nothing to stop and so the condition “Sound\Music on channel is Stopped” should never be true in my opinion.

Example:

GDevelop 5 beta82
Windows 10 64bit

1 Like

Thanks for the detailed report and the example game. The example was very very useful.
See my answer there: Sound\Music on channel is stopped condition return true before it is begin to play · Issue #1299 · 4ian/GDevelop · GitHub it should be fixed for next version.

1 Like