Re: [LAD] Real-time plotting of audio/ oscilloscope.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-dev@...>
Date: Friday, June 18, 2010 - 12:37 am

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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] Real-time plotting of audio/ oscilloscope., Johannes Kroll, (Fri Jun 18, 5:10 pm)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Damien Zammit, (Fri Jun 18, 12:53 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Robin Gareus, (Thu Jun 17, 2:23 pm)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Peter Nelson, (Thu Jun 17, 7:21 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Jörn Nettingsmeier, (Thu Jun 17, 7:29 pm)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Paul Davis, (Thu Jun 17, 8:28 pm)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Nick Copeland, (Thu Jun 17, 8:53 pm)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Robin Gareus, (Fri Jun 18, 1:13 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., David Olofson, (Fri Jun 18, 12:37 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Will Light, (Thu Jun 17, 5:59 pm)
Re: [LAD] Real-time plotting of audio/ oscilloscope., James Morris, (Thu Jun 17, 7:57 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Philipp Überbacher, (Thu Jun 17, 8:11 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Jeremy Jongepier, (Thu Jun 17, 1:36 pm)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Ralf Mardorf, (Thu Jun 17, 6:25 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Gene Heskett, (Thu Jun 17, 2:30 pm)
Re: [LAD] , Mike Cookson, (Thu Jun 17, 8:04 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Ralf Mardorf, (Thu Jun 17, 7:26 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Paul Davis, (Thu Jun 17, 10:41 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Gene Heskett, (Thu Jun 17, 2:48 pm)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Ralf Mardorf, (Thu Jun 17, 7:33 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Ralf Mardorf, (Thu Jun 17, 6:41 am)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Gene Heskett, (Thu Jun 17, 2:27 pm)
Re: [LAD] Real-time plotting of audio/ oscilloscope., Ralf Mardorf, (Thu Jun 17, 6:43 am)