[PD] external: How to force calling the "dsp" function?
Matthias Geier
matthias.geier at gmail.com
Fri Nov 20 19:37:43 CET 2020
Dear list.
I'm working on a Pd external
(https://github.com/AudioSceneDescriptionFormat/asdf-rust/tree/master/pure-data)
which uses class_addmethod() with gensym("dsp") to register a "dsp"
function.
I guess this function is called whenever the audio graph changes, and
that works fine.
However, my external accepts an "open" message which might allocate a
new internal buffer, and I would like Pd to call my dsp function in
order to update a few pointers so that the "perform" function can
access the new buffer.
So my question is: Can I somehow, after handling my "open" message,
force the "dsp" method to be called?
And a related question: What happens when my handling of the "open"
message takes longer than expected? Will the "perform" function be
called even if the "open" handler isn't finished yet?
Or can I somehow tell Pd that it should stop calling my "perform"
function for a little bit while I allocate a new buffer and then tell
it to call the "dsp" function and afterwards resume calling the
"perform" function?
BTW, with "perform" function I mean the function that has been
registered with dsp_addv().
cheers,
Matthias
More information about the Pd-list
mailing list