How do you concatenate 2 sounds without delay

I’m in the same problem :sob:

Ya, you fundamentally cannot do seemless concatenation with Sound Cues. Sound Cues run on the game thread, they’re limited by the time it takes to communicate between the game thread and audio render thread.

You can, however, concatenate sample-accurately in MetaSounds. Syntax looks like of like this:

1 Like

what if you spawn the sounds (with auto destroy off) , stop the sounds and store in variables.
once spawns are created then you can Play sound 1–>delay—>play sound 2 with the exact diration of sound 1 for the delay.

Try this for preloading

and this for playing:

The Crossfade by distance node should do the exact same thing of the delay node, but for some reason it doesn’t work if I set the values (both sounds start playing at the same time overlapped)

I solved this adding a delay node where DelayMin and DelayMax are the exact duration of the intro soundwave:

4 Likes

The Crossfade by distance node should do the exact same thing of the delay node, but for some reason it doesn’t work if I set the values (both sounds start playing at the same time overlapped)
I solved this adding a delay node where DelayMin and DelayMax are the exact duration of the intro soundwave:

Thanks, It’s not quite perfect every time, but it works just fine for most of my songs. One song it still slightly can be noticed that somethings weird right when it cross fades sometimes, but that’s still a lot better than the other methods I’d used till now for it.

1 Like

You’re welcome, I know it’s not perfect unfortunately, this is the best workaround I found (I was in a hurry because I needed it for a game jam).

I learned that these small errors could be due to how computers work: nothing really happens “at the same time”, there’s always some latency between tasks (and this latency could vary, so the result can be different every time you play it)

Just a curiosity that I discovered while I was looking for a solution:
In Nier Automata to keep the audio tracks synced (switching between the 8 bit version and the regular one) they used a four channel track and lowered/increased the volume of two channels at a time.
The developer said that the more they played the more the soundtracks were going out of sync (for the reason I mentioned before), so they had to implement this workaround.

This is a great solution, thanks!!

1 Like

Did you guys figure it out?
If not, I have a solution. Just let me know

even with MetaSound with sample accurate timings, I have a little noise when OnNearlyFinished.

for example, try to cut audio track and switch InputWaveParameter in MetaSoundSource.
another issue which I have with SoundWave generated in packaged project and Metasound (can’t read runtime format, which filled through serialization)

I have found solution using MetaSound.
This plays without gap (both in editor and shipping build).


If for some reason you absolutely have to use CUE, then this will also work. But be aware that this is workaround, not solution.


In my case 1 second delay for intro was enough (actual time to load asset was between 400-600ms).
Just make sure that attenuation applied is making music silent (this is just for preloading asset, not actual play). For example have it configured like this:
Workaround - Attenuation

2 Likes