You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Thanks for the example, very useful! I've fixed that for next version (cd32e51).
Precisely, calling the action to play the sound or music will immediately consider the sound/music as being playing - even if loading. So you can immediately use the action to check if the sound/music is stopped.
It will be stopped when 1) finished, 2) you stopped it with another action or 3) an error happened during loading.
Describe the bug
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.
Forum:
https://forum.gdevelop-app.com/t/bug-sound-music-on-channel-is-stopped-condition-return-true-before-it-is-begin-to-play/21487
To Reproduce
Steps to reproduce the behavior:
sound-test.zip
Other details
GDevelop 5 beta83 Desktop
Windows 10 64bit
The text was updated successfully, but these errors were encountered: