[CLAM] Help with AudioCircularBuffer

Xavier Amatriain xamat at iua.upf.es
Sun May 15 15:50:13 PDT 2005


Hi again,

> Winamp feeds my music analysis plugin with frame audio data through a
> callback function. I use the circular buffer to aggregate enought data to
> do a FFT of a reasonably sized frame. How do you suggest I use In and
> Outport in this case?

If you are using it to connect to the "outside world" then it is a good
choice. We use similar workarounds when developing VST plugins with CLAM.
In this case the Port mechanism would not help.

> And while I have you on the line; For the FFTs I want to have a 50% frame
> overlap. Is it possible to rewind the read index of the circular buffer by
> half a frame size? Without violating any assertions?

Yep, you can rewind the read index using the appropiate method. You will
not be violating any rule as long as the write index does not surpase the
read index, as I said. Than means that you should take into account this
overlap factor when choosing the size of your buffer.

------------------------
   Xavier Amatriain
 Music Technology Group
Universitat Pompeu Fabra
 www.iua.upf.es/~xamat
-------------------------






More information about the clam-users mailing list