#Seamless audio playing

11 messages · Page 1 of 1 (latest)

gleaming dome
#

Hello! I want to play another audio source after my previous one finishes immediately without a gap. My problem is that spawning doesn't happen immediately so there is a small gap in the music. Any idea how to solve this?

lament ermine
#

What might be delaying the spawn is actually the loading of the sound file

#

So you could trying loading the mp3/ogg before having to do the swap

gleaming dome
#

It is already loaded though. I just pass the handle when playing it.

#

(I load everything at the start of the game)

gleaming dome
#

I basically have an intro that is played once and after it finishes (tried on running on Update and PostUpdate) I have a system that removes all sound components and reinserts an AudioPlayer with the loop part of the music.

And there is a small gap between the intro and loop parts that I am trying to eliminate.

gleaming dome
#

I guess I have to make a stream that does this using decoder()...

gleaming dome
#

Well I looked into this a bit more and it is too complicated to do. Maybe something for after the jam.

#

or actually bevy kira audio maybe able to do this

#

hmm

gleaming dome