Tracks not syncronized


(Daniel Zaidan) #1

Hi!

I have some soundtracks in the game and they are setup as follows:
enter image description here

I just call the event and play with the parameters in the game.
However, sometimes the tracks go out of sync. Since it is music, even a little sync problem feels really off.

I came across this post: http://www.fmod.org/questions/question/layers-going-out-of-sync/

And tried the following solutions:
enter image description here

And
enter image description here

(I tried calling LoadEventsData at the game instance’s Init Game, at every level start and both)

However nothing fixed the problem.

What can I go to fix this problem?

Thanks,
Dan Zaidan


(Andrew Scott) #2

What FMOD version and UE4 version are you on? And what platform(s) are you seeing this problem on?


(Daniel Zaidan) #3

Hi Andrew, thanks for answering.

I’m using UE4.16 (built from source).
I downloaded the FMOD integration from Git Hub when the 4.16 update was made, so I’m not sure what version is that (how can I check?).
I can hear this problem in both Windows and PS4 (the two platforms I test my game on).

Thanks.


(Cameron Baron) #4

You can check the version in Unreal Editor by going to the Help menu then “About FMOD Studio”.

My first suggestion would be to update to the latest integration (1.09.06) which now has an optional download for UE4.15 or UE4.16, as well as a number of other fixes.


(Daniel Zaidan) #5

Hi Cameron.

It says build version: 1.09.04 and DLL version 1.09.04

Now that I think of it, I’m not building using the FMOD studio version 1.09.04. Hopefully that is the problem?

I’m going to try and build with a 1.09.04 version and if it doesn’t work, I’ll update the engine integration to 1.09.06.

Thanks!


(Daniel Zaidan) #6

I have some (good?) news.

The event when played inside FMOD Studio 4.09.04 sound exactly like when built in Unreal, with the synchronization problem.

Here is a video of the same event being played inside FMOD 4.08.00 and 4.09.04.

What could possibly be the reason for this problem?


(Daniel Zaidan) #7

Okay, so based on this page: http://www.fmod.org/questions/question/fmod-layers-loop-perfectly-in-fmod-but-are-slightly-out-of-sync-once-the-file-is-played-in-unity/

I managed to do a hack and disable the stream option for all the music modules.

I would still like to know what might actually be the problem that the music can’t stream properly because having a 3-minute multi-track music not stream is not a good idea to have in the final game!


(Daniel Zaidan) #8

Well, now my game is randomly crashing on the PS4.
I guess it can’t handle the extra memory…


(Daniel Zaidan) #9

Based on this thread’s third solution: http://www.fmod.org/questions/question/fmod-layers-loop-perfectly-in-fmod-but-are-slightly-out-of-sync-once-the-file-is-played-in-unity/

What should I set the Schedule delay to? In what units does it operate?

Edit: Setting it to 100 didn’t solve the problem.


(Cameron Baron) #10

This probably needs some better documentation as it isn’t very clear.
The units the schedule delay uses is dsp clocks, still not very helpful.

The default streaming schedule delay is 8192, so to increase the delay you would need to start at 8192 + X. Values for X around 2048 have been found to help.


(Daniel Zaidan) #11

Hi Cameron.

Thanks for clearing that up!
It solved the problem! (Though I had to set it to 20480 and not 10240 like you suggested).

Anyways, thanks for the help. o/