[SDL] SDL Newbie questions: Audio latency and YUV Overlays
Justin Schoeman
justin at suntiger.ee.up.ac.za
Tue Oct 23 17:04:14 PDT 2001
** I am not on the list, so please cc me any replies! Thanks. ***
Hi eveybody,
I am busy trying to write my first real SDL app, a streaming video
player. I have the framework finished, and working well, but have the
following two problems:
1) Audio latency:
I keep the audio playing continuously. Whenever the audio callback
fetches more data, I check the timestamp of the audio being played, and
ensure that the same video frame is displayed. Unfortunately, the audio
plays about 0.5s _after_ the video. When I check the size field in
SDL_AudioSpec, it is 1024, or a delay of about 0.05s. Is there any way
to accurately determine the latency between the audio being fetched, and
played?
2) YUV Overlay:
The hardware accelerated YUV overlay works great, but when run on a
machine without HW acceleration (ATI Mach-64 with standard Mandrake 8.1
drivers), only the first 4 pixels of the image are rendered, in the top
left hand corner of the display! The pixels do scale correctly when the
window is resized, but still only the first four pixels are rendered
(just larger).
Any help/hints would be greatly appreciated.
Thanks,
-justin
More information about the SDL
mailing list