No. Audio is a continuous stream (it's constantly playing in the background), and video is subject to frame timing (it doesn't display on the screen right when you call to draw it). The act of preparing more audio or video takes a variable amount of time, so to avoid choppy playback you'll want to have it ready ahead of time and set to automatically play/display at the end of the last segment (i.e. use a queue). Then by regularly checking each of the streams' relative position against the reference clock (using an average calculated over time, to help mask timer/timing errors), you subtly speed up or slow down playback to get back within some margin of error without the user noticing.Apeirogon wrote:You mean something like
[...]
It's pretty complicated stuff to do right, especially on a protected-mode multi-threaded system where you're not able to touch hardware directly and are subject to the OS scheduler.