Programming From Scratch [3]

Old No Comments on Programming From Scratch [3] 125

Congrats! You made it to part 3, the hardest part so-far. We will be syncing the video we made last time to audio!  We have to do this, as the video does not have a steady frame rate to common visual styles. Last time our code look like the following:

We had brute force the solution and rendered every single frame one after another.  But now, we have a new solution.

Now lets get to the bottom of this, remember you can download source here. After every tutorial the source is updated, so re-download if you don’t have Tutorial 3 folder.


First off, I know the ‘currentSequence += 2’ is worthless as it is overwritten, but it is a nice feature to debug in the future. Now with the audio sync, we have to do math and find what percentage of progression


So I use the calculation of the first one, as it was the only one to work. Once so, we added a new way to put 0’s in front of our string with the while loop eliminating brute-force if’s. Also, there is now a progression bar on the bottom to keep track of current video section. Here is the output on 1.4 Ghz AMD E1 APU (3 GB Video).

Thanks for tuning into part 3, stay tuned for part 4 coming soon!


Katy Pillman

Katy Pillman is the Lead Programmer for Tactician Studios LLC. She is young, but experienced in the technical field, and writes in her free-time. △ ◎ × □

Related Articles

Leave a comment

Back to Top