Hi, our mpeg4ip player (gmp4player) is a cross platform video player
(mostly linux and other unix variations, Windoze and mac). We’re
currently using SDL, which I had to modify to return the latency in the
audio output buffer (in msec). Carrying this around is a bit of a pain – every release they make, I need to make one of my own. I also haven’t figured out how to make it work on
It looks like the FSOUND_Stream apis are well suited for this; it looks like all I need to do is use FSOUND_Stream_Create and use something like my old SDL callback. Is this right, and can someone point me to any docs/examples ?
Can someone tell me if the FSOUND_Stream_GetTime will return the value of the actual output buffer (like FMUSIC_GetTime) ? (For example, with OSS, I use the SNDCTL_DSP_GETODELAY call). Can these calls be used inside of the callback ?
Thanks for the pointer – I will check that out today.
Your statement would be true if the callback happened during an interrupt; however, in Linux, the callback can be delayed (assuming that you’re in user space at that time, and not in the kernel) due to process and thread switching.
That’s the reason for the callback buffers
The latency value allows me to calculate the “real time” so I can get a really good, accurate to a couple of msec value so that I can sync the video frame to the audio.
So, back to the question – I couldn’t tell by your answer if the FSOUND_Stream_GetTime call returns an accurate time (I don’t care if the time is accurate from the beginning of the stream, just accurate relative from one callback to the other.
Or if there is any other call that would give me similiar information. I’m particularly interested in mac osx and alsa – I have OSS taken care of.
Please login first to submit.