G'day,
I am in progress of developing Sirens, a game of composing a "song" by laying cards in a certain order.
One of the option i like to add is after all cards are placed is to play the "song" by playing all parts (which are all seperate mp3's) in the order as the cards are placed, but the sample do not have exactly the same length.
Now i start the next sample after 3 seconds, which is more or less the length of the samples via a settimeout function, but it would be better to get an event after playsound is completed so i can start the next one.
Does playsound have such an option (undocument then i guess) or should i set the timeout variabel per card?
Any thoughts?
I am in progress of developing Sirens, a game of composing a "song" by laying cards in a certain order.
One of the option i like to add is after all cards are placed is to play the "song" by playing all parts (which are all seperate mp3's) in the order as the cards are placed, but the sample do not have exactly the same length.
Now i start the next sample after 3 seconds, which is more or less the length of the samples via a settimeout function, but it would be better to get an event after playsound is completed so i can start the next one.
Does playsound have such an option (undocument then i guess) or should i set the timeout variabel per card?
Any thoughts?