[PD-dev] does pd use dual buffer approach ?

Sergei Steshenko sergstesh at yahoo.com
Sat Aug 18 22:50:46 CEST 2007


Hello All,

I have a very basic question regarding pd - does it use dual buffer approach ?

That is, suppose I'm going to use a FIR (FFT, for example) with long (several
seconds) processing time (latency), and there is enough CPU performance to do
processing in real time.

Still, if I want to hear uninterrupted sound, the sound card, having, say,
a buffer of 4096 samples has to be fed new data much more often - with 44.1KHz
sampling frequency it has to be fed about 11 times per second.

So, a possible solution is to have to buffers - while one of them is waiting for the
new data from the FIR, the other piece by piece feeds data to soundcard, and when the
feeding buffer is empty, the buffers are swapped.

So, how does pd deal with long latencies like in the case described above -
does it use dual buffer approach in order to have uninterrupted sound ?

Thanks,
  Sergei.

Applications From Scratch: http://appsfromscratch.berlios.de/


       
____________________________________________________________________________________
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/




More information about the Pd-dev mailing list