Hi,
I am using the Core API exclusively.
In the project I am working on 3D cutscenes are played in real time at an intended locked 60 FPS. All audio for cutscenes is part of a single audio track that is played when the cutscene starts.
Due to the way FMOD plays audio asynchronously, it is possible and quite common for frame drops in the cutscene rendering to cause the audio to become out of sync.
Are there any recommended approaches to solving this kind of problem?
Thank you
Hi,
An option would be syncing the video playback position with the channels current playback position: FMOD Engine | Core Api Channel - Channel::Getposition. It is better to sync the video with the audio, rather than the other way round. We do have an scripting example using the Unity video player: Unity Integration | Examples Video Playback which also uses the Core API.
Hope this helps!
1 Like
Hi,
Essentially all I ended up doing was:
unsigned int position;
ERRCHECK(mChannel->getPosition(&position, FMOD_TIMEUNIT_MS));
frame = (position * 60) / 1000;
Which seemed to work fine at the moment since the animation frames are saved at 60FPS.
1 Like
Thank you for sharing your solution!