[Urgent] I only have a few hours to get this fixed before I have to enter a competiton. Its not too bad if it doesn’t get answered by then, but presentation wise it will make the entire game quite bad.
For the project I am working on, I have an action that is full of shapekey keyframes, that animate a persons mouth. I activate this action at the same time as the sound, but at the end of the action(Which is 5mins long, same with the sound), the sound and action are out of sync by several seconds, even when there has been no lag. All my settings are on default, using Open ADL or whatever its called lol :D. The animation is at 24 frames a sec, and the game is at 60. I would post the file but its 200mb, so its a bit large. I hope someone knows why this is happening :).
Edit: Btw, I believe the Mouth is moving too fast, not sure why though.
You can try to find a way to re-sync the audio with the action while its playing by seeking to the correct point in the sound file. The Aud module API mentions seeking, but I’m don’t know exactly how since I haven’t used it before. The only other thing I can think of doing would be to split up the sound file into smaller chunks and have them triggered at the correct points during the action.
If my understanding is correct, the reason they get out of sync is because once you make a call to start a sound file, it’s basically handled independently by your sound card and drivers. This is why your sound and music usually still sound fine even when programs are running slow on your computer.
Check that you have enabled use animation frame rate in the render settings, game mode. Ensure that the audio plays for the correct length of time
Sent from my Nexus 7 using Tapatalk 4
Thanks you two! I checked both those things agoose, and the sound played for the correct length, and the checkbox was ticked. The sound playing the correct length even when there was lag proved what Mobious said, that its played seperately from blender. In the end I made a python script that would play the audio, and every second it would sync back up to the game using an in-game time variable(that would lag when the game lagged(which is good :D)). The compettition went really well, and I can’t wait for the results, thanks for your help!