Audio Callback function requiring better docs ?
Will the len of bytes sought always be the same for each callback so long as the size of desired.samples remains constant ?
The only way I can envision calculating time according to audio under SDL is to assume that the callback happens within a very small tolerance of when the last byte was emptied out of the buffer before the callback occurred and that futhermore, that last byte will very “SOON” hit the actual speakers. These assumptions seem only “reasonable” for small buffer sizes.
I’m considering using SDL_Audio and SDL_Video for some sample media player code, but cannot use SDL_Audio with much confidence until I can use it as a timekeeper. If in practice I can calculate within 1/10 of a second at what time a sample should hit a speaker, then I could probably get excited about SDL_Audio as a cross platform video tool.
So what I want to know is … who else is thinking about these things and are there any detailed samples or docs that could help me achieve this goal of timing according to audio played under SDL ?
Maybe I’m just supposed to determine experimentally is SDL_Audio is good enough for me. From some of the responses to my prior thread, I’m holding out hope.
I really do want to do this on Mac, PC, and Linux if possible. But Mac OS X is my current concern.