Hello! So, I'm trying to make a dynamic music system. I currently have my music being held in a audioQueue list. I'm what I'm attempting to achieve is:
- Have my music play, one clip after another. (1, 2, 3, 4...)
- Have a fall back once the music clips played reach a specific song. This will repeat the current song playing if its position in the queue is the same as the measure where it should stop. This is defined in
inputMusic.Measure. The songs playing would look something like this: (1, 2, 3, 3, 3, 3). - If the
inputMusic.Measurevariable is changed, it should finish playing that song, and then continue to play the songs with the pattern mentioned previously until it reaches the next instance ofinputMusic.Measure.
(I apologize for the poor description. Please ask questions and I will clarify if you are confused)
Currently, I am able to run this code and it nearly functions as intended. The audio clips play as follows: (0, 1, 2, 3, 2, 2, 2...) My issue: When it is supposed to loop on the 3rd clip, it returns back to the second clip instead. Any help or input would be appreciated, as well as any input on how I can improve.
Here is my code:
https://pastebin.com/Az1Vj3T7
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.