Tutorial 06: Synching Audio同步音频
Code: tutorial06.c§
Synching Audio同步音频
So now we have a decent enough player to watch a movie, so let's see what kind of loose ends we have lying around. Last time, we glossed over synchronization a little bit, namely sychronizing audio to a video clock rather than the other way around. We're going to do this the same way as with the video: make an internal video clock to keep track of how far along the video thread is and sync the audio to that. Later we'll look at how to generalize things to sync both audio and video to an external clock, too
现在我们有个像样的播放器可以观看一部电影了,那么我们来看下究竟我们用到了什么知识点。上一次,我们做了一点同步的工作,也就是采用了同步音频到一个视