title: Syncing audio and video playback with OpenAL & C++
body: <p>I am trying to create a webcam chat program in C++, and while I have been able to get the images to be captured sent and played, I am having trouble with doing the same with the audio: the audio lags and very quickly goes out of sync with the video, even when I just played it to myself.</p>
  
  <p>I found <a href="https://stackoverflow.com/a/5518320/2288890">this</a> answer and sample code to be really useful. </p>
  
  <p>Are there any modifications I can make to this code to get it to be nearly lag free, or is OpenAL not right for this? I am using Windows, but I plan on making a linux version later.</p>