- Home /
Desynchronization of Gameplay with recorded Audio
Hello, my team and I are working on recording the transforms of objects in a game in order to replay them later. With this functionality the users are able to watch again what they have done on a specific run of the game.
The frame rate when recording is different from the frame rate when replaying. However, we have managed to make the replay discard recorded transforms when the frame rate of the replay is lower and wait when it is higher. In this way we manage to have almost identical frame rates for both cases.
We also want to include the speech of the users in the replay and thus we record it using Microphone.Start(), we save it in a .wav file and we replay it using an audiosource. We have encountered the following problems:
1) We have found that the length of the (recorded) game in seconds is different than the length of the audiofile. This difference is around 2-2.5 seconds regardless of how many seconds is each round.
2) Also, we have found that the timeframe when an object is recorded (i.e. when it is moving) is different from the timeframe when we say (in the audiofile) that it has moved. This difference is from -1 seconds to +1.5 seconds and we have not found any reason why this is happening.
3) When we are in replay mode almost all the times there is no delay in the beginning but afterwards the movement of the objects is earlier from when we say they have moved. However, there are times that everything is perfect and the sound follows the movement of the objects.
If anyone has a clue on why this is happening please let us know.
Your answer
Follow this Question
Related Questions
Unity 5 and using a microphone 1 Answer
Voice Recording issue ?? 0 Answers
Microphone Failed Result=33 0 Answers
Audio Record Limit? 1 Answer
Microphone capture different channels 0 Answers