Real time application using SDL

Hi folks!

I’m lookin’ for an extension for SDL that enables an real time interface - maybe using KURT, RT-Linux, RT-AI or some other real time Linux extension.
I need a resolution of approx. 1 ms - where 1 ms is the maximum acceptable delay…
The program will be used to display pictures and play sound in real time - it’s kind of a “reflex test”. The user triggers an interrupt and the time between the display and the user intervention has to be exact.

Are there any extensions? Has anyone experience in using SDL with a resolution of 1 ms?

Thanks for your help!

Bye

Sebastian Rieger

Hi folks!

I’m lookin’ for an extension for SDL that enables an real time interface - maybe using KURT, RT-Linux, RT-AI or some other real time Linux extension.
I need a resolution of approx. 1 ms - where 1 ms is the maximum acceptable delay…

SDL’s timing mechanisms don’t support real-time applications, since most
of the operating systems it runs on do not support that yet. However, if
you are running as root on Linux you can open the Real Time Clock device
/dev/rtc and get very good resolution delays.

Check out /usr/src/Documentation/rtc.txt for more information.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

I’m lookin’ for an extension for SDL that enables an real time interface - maybe using KURT, RT-Linux, RT-AI or some other real time Linux extension.
I need a resolution of approx. 1 ms - where 1 ms is the maximum acceptable delay…

SDL’s timing mechanisms don’t support real-time applications, since most
of the operating systems it runs on do not support that yet. However, if
you are running as root on Linux you can open the Real Time Clock device
/dev/rtc and get very good resolution delays.

Actually for what he was trying to do a busy-wait loop with gettimeofday()
might be the best alternative, maybe combined with FIFO scheduling for the
adventurous