I want to have one song play after another, however I can't find a way to do that. Currently I just have sounds.song1:play() to play the first song, but if I want to add a song2, I can't find a way to time it so it plays after. Is there a way to sort of queue the song, or at least detect when the first one has ended so I can play the second one after?
I'm clearly new to LÖVE, this is very soon after I added audio at all.
Edit: Solved, used Source:isPlaying()
Is there way to add a song to a queue?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Is there way to add a song to a queue?
Last edited by Egg_Spoon on Wed Aug 30, 2023 9:35 pm, edited 1 time in total.
Re: Is there way to add a song to a queue?
Are you looking for this?
https://love2d.org/wiki/love.audio.newQueueableSource
https://love2d.org/wiki/Source:queue
https://love2d.org/wiki/love.audio.newQueueableSource
https://love2d.org/wiki/Source:queue
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Re: Is there way to add a song to a queue?
Make the function to check it:
viewtopic.php?p=168187#p168187
viewtopic.php?p=168187#p168187
Re: Is there way to add a song to a queue?
As darkfrei implies, for this purpose I'd suggest to use Source:isPlaying() in love.update and play the next when the current one stops playing, because you can certainly afford a one frame delay between songs, rather than going into the complications of queueable sources.
Re: Is there way to add a song to a queue?
alright I got it working, tysm :>
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], steVeRoll and 7 guests