<div><br></div><br><div class="gmail_quote">On Thu, Jun 17, 2010 at 5:06 PM,  <span dir="ltr"><<a href="mailto:fons@kokkinizita.net">fons@kokkinizita.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Thu, Jun 17, 2010 at 10:53:31PM +0200, Nick Copeland wrote:<br>
><br>
> How do the other scopes work? If you really want to get a good image of<br>
> a waveform on a screen then you might want to totally divorce the sampling<br>
> rate from the screen drawing:<br>
<br>
</div>Yes. For a soft scope you have two options: a horizontal scale<br>
caibrated in 'samples' (a pixel corresponds to an integer number<br>
of samples), or one that maps to time (in ms or us).<br>
<div class="im"><br>
> To actually see a waveform and how it develops then you really need the scope<br>
> to sync to it. The way the oscilloscopes worked was a detection level at which<br>
> to start painting (positive edge zero crossing for example but other levels are<br>
> equally acceptable) and a delay time before searching again (blanking period,<br>
> more or less).<br>
<br>
</div>In a digital scope finding the sync point requires upsampling by a least<br>
a factor of four, then you can interpolate linearly. After that, to<br>
display the actual waveform correctly aligned to the sync point you may<br>
have to interpolate even to a finer level. It's not at all a simple<br>
thing.<br>
<div class="im"><br>
Ciao,<br>
<br>
--<br>
FA<br>
<br>
O tu, che porte, correndo si ?<br>
E guerra e morte !<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">Linux-audio-dev mailing list<br>
<a href="mailto:Linux-audio-dev@lists.linuxaudio.org">Linux-audio-dev@lists.linuxaudio.org</a><br>
<a href="http://lists.linuxaudio.org/listinfo/linux-audio-dev" target="_blank">http://lists.linuxaudio.org/listinfo/linux-audio-dev</a><br>
</div></div></blockquote></div><br><div>I don't need to sync the oscilloscope.  I don't need to interpolate.  I don't need to get a good image of the waveform.  I just need to draw a few pixels on the screen.  I had it working fine with libplot, and I would have been more than happy with how it displayed, except it caused xruns.</div>

<div><br></div><div>I thought that something like SDL was direct memory access.  The pixel setting method I used only called one SDL function, to map RGB to an integer.  The rest of it was just some basic arithmetic to figure out where to point to, and then dereferencing a pointer.</div>

<div><br></div><div>Anyway, is there any library that provides me with an array to write to, and it handles refreshing the screen?  That way I would essentially just be writing to an array, which should be really fast inside the realtime loop.  I thought that is what SDL does, but I guess not.</div>

<div><br></div><div>Jeremy</div>