Joined: 4/26/2004
Posts: 213
Location: Montréal, Québec
While messing with adding sound to AVI dumping, I made a discovery. When you record and playback movie, you should set the sound rate to 44100. Here's why When testing with AVI dumping, I made a Sonic movie of around 4 minutes with rate of 22050. The AVI played well with sound. However, as the movie progressed, the sound seemed to be late with the video. The jumping sound wasn't in sync with the jump itself. I tested with different player and got the same result. I opened the movie with VirtuaDub to see its statistics. There was 4:47.75 of video and 4:48.14 of audio I searched throught the code to see what caused this difference. I found it. The problem is how the audio segment length is calculated. 44100 samples per second divided by 60 frames per seconds equals 735 samples processed per frame 22050 samples per second divided by 60 frames per seconds equals 367.5 samples processed per frame the problem lies in the .5 . The audio segment length is stored in an integer. So it is rounded to 368. It means that the sound engine is going 0,13 % slower with a rate of 22050 than with a rate of 44100 Guess what : 4:47.75 * 368 / 367.5 = 4:48.14 I'm not 100% that this really affects recorded movies but that could explain the desync problems with Castlevania Bloodlines EDIT: Wrong board
Active player (410)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
We're waiting for this future version of Gens.