Sk8dududu
Member
I'm attempting to play a short sound clip (~10 seconds), and if the player has progressed enough by that time, it plays a new sound, if not it will loop that sound again, and then check for completion.
Is there a function for checking if the song has ended? or make something happen when it ends.
What I've used is setting an alarm 1 frame before the sound clip ends to check if the progress has been made. And then playing the clip again if it hasn't. I'm concerned about the sound clips getting out of sync with the alarm though if the game drops any frames.
is this not something I should worry about?
The other idea I thought of was to check if the sound is still playing in step event, and if its not, then check if should play that sound again. But this is concerning because there cannot be any frames between the two tracks, it has to be seamless. (because the two tracks are part of 1 song, the first track loops perfectly into itself and into track 2.)
Is there a function for checking if the song has ended? or make something happen when it ends.
What I've used is setting an alarm 1 frame before the sound clip ends to check if the progress has been made. And then playing the clip again if it hasn't. I'm concerned about the sound clips getting out of sync with the alarm though if the game drops any frames.
is this not something I should worry about?
The other idea I thought of was to check if the sound is still playing in step event, and if its not, then check if should play that sound again. But this is concerning because there cannot be any frames between the two tracks, it has to be seamless. (because the two tracks are part of 1 song, the first track loops perfectly into itself and into track 2.)