Hello everyone, I think my question is related to this one Music layers going out of sync - #3 by sronc002 but I didnt manage to find a solution.
THE PROBLEM: I have a music with 4 tracks ( a base and 3 tracks that are layers that are crossfaded) (image 1 demonstrate this structure) *It works in FMOD 100% in sync. But it dont work in unreal. Crossfading between them have a chance to go out of sync!
Reading at the forum I notice that I might need to preload the samples before playing, so I did just that with Load Bank and Load Event Sample Data, and some combination of both of them, but kept the same sync problem:
(By the way is this how I am supposed to preload the banks/samples ? This is inside the first person character BP where it is the Music FMOD Event)
Then I tried ticking in Unreal project preferences the options ( Load All Banks , Load All Sample Data) but the problem persist equally.
So I am out of ideas what to try next, as it is a music game the precision between tracks is very important. Any Ideas? Maybe turn off streaming for the music samples?
EDIT: I changed all samples to be non-streaming uncompressed, but still they go out of sync, the problem persist, and fmod is 100% fine.
Should I upload the project here?
I would prefer to find a solution and keep using different tracks at FMOD but as a last resource I am considering using multi-channels audio for that.
Unfortunately I’ve been unable to reproduce the issue on my end by following a setup similar to the GIF you linked - if you could upload your FMOD Studio and Unreal projects (or stripped down versions of each where the issue is reproducible) to the “Uploads” tab of your FMOD Profile so that I can take a look at it and help diagnose the issue, that’d be great.
The two ways of loading sample data are to either load a specific event’s sample data (technically the API call is to
EventDescription::loadSampleData) , or to load an entire bank’s sample data, which is the same as loading the sample data for every event contained within. In your picture, since you’ve ticked “Load Sample Data” when loading the bank, you’re already loading the sample data of all events associated with that bank, so the “Load Event Sample Data” node afterwards is redundant. Another way is indeed to enable “Load All Banks” and “Load All Sample Data” in the FMOD Settings.
However, it’s worth noting that typically “preloading” implies that you’re loading event sample data some time before actually playing the event so as to ensure exact audio scheduling. If event sample data isn’t loaded, but the associated bank is, then creating the event instance causes required non-streaming sample data for the event to be loaded asynchronously.
Typically, issues with precise playback timing/scheduling are solved by making sure your assets aren’t set to stream. Streaming is primarily a memory saving consideration, at the expense of disk IO, CPU overhead, and inexact audio scheduling; even if streaming isn’t causing this specific issue, given your intended audio behavior, I would still definitely recommend making sure they’re not set to stream.