Music layers going out of sync

Hey!

Having trouble stopping my music layers go out of sync.

The system works by fading in the next layer of music, whilst fading out the previous layer. Effectively swapping layers. But during the overlapped crossfade, i can hear there’s a slight delay. Please see screenshot.

This also happens within mins of gameplay. So im assuming it’s an immediate issue.

I have the tracks as a nested event - could that affect the loading times of each track?

All assets are non-streaming. I’ve also set the volumes to never dip below -75 which i’ve read could cause this issue.

I also have several parameters that add momentary filters to the music, or increase the wet track automation. Not sure why they would affect the sync but thought it worth mentioning.

Any ideas of what i can try next?

Thanks in advance!

1 Like

Hmm… If you remove the volume automation from the audio tracks in your parent event, do the various tracks play perfectly in sync? Or are they out of sync at certain points in time?

so interestingly, i can’t recreate the bug inside of Fmod, only in Unity during gameplay.

I wonder if the loading times in there are causing this? Anything i can potentially do on my end?

or perhaps the nested events are going out of synch with each other?

This strongly suggests that the sample data associated with your events is not being loaded in time for the events to play.

Have you enabled the “Preload Sample Data” setting for the event emitter or bank loader, or enabled “Load Bank Sample Data” in FMOD’s initialization settings? Any of these settings can cause the sample data to be loaded into memory in advance, reducing latency when the event instance is played if done with enough advance notice.

1 Like

i have not but will try next - thanks!

is it possible to JUST pre-load a music bank instead of all sounds?

You may want to check my hard code fix that you can find here:

1 Like

Yes, of course! Being able to pick which banks’ content should be loaded is what the bank loader component is for. Indeed, it’s the purpose of banks, themselves.

1 Like

thanks a lot for this! Very insightful. My system doesn’t sound as intricate as yours so will try the pre-load feature in Unity first :slight_smile: