On Friday 18 June 2010, at 02.09.43, Jeremy wrote:
[...]
Of course. Depending on how you set up the SDL display, the pixel plotting may
actually just be raw memory access in a system RAM shadow buffer. No
scheduling/xrun issues with that, obviously. Refreshing, however, is where the
real work is done. Whether you're using SDL or the underlying APIs directly is
of no relevance here.
Realistically, for reliable operation in your average environment (X11,
Windows GDI, whatever...), there is only one solution: You need to move the
plotting into a separate thread. Could be a global GUI thread. What's critical
is that it's NOT the audio thread.
You may get away with just passing the coordinates (or raw samples) from the
audio thread to the rendering thread via a shared buffer, but the proper,
solid solution is to pass it in some synchronized manner, preferably lock-
free.
--
//David Olofson - Developer, Artist, Open Source Advocate
.--- Games, examples, libraries, scripting, sound, music, graphics ---.
| http://olofson.net http://kobodeluxe.com http://audiality.org |
| http://eel.olofson.net http://zeespace.net http://reologica.se |
'---------------------------------------------------------------------'
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.