[PD-dev] proposal: postdsp callbacks

Tim Blechmann TimBlechmann at gmx.net
Fri Jul 15 14:39:18 CEST 2005


hi all,

messaging functions called by dsp routines are usually implemented by
using clocks with a delay 0.
this only works as long as the clock callbacks are executed after each
dsp tick.
this causes problems for my scheduler, that uses the callback from the
audio api (jack / portaudio) to run the dsp tick. running all the clock
callbacks from the audio callback is not a good idea, since it's running
from a separate thread and possibly in realtime (i.e. gem would crash).

thus i'd propose the following api extension:
sys_postdsp_callback(t_method fn);

the function fn would be called immediately after dsp_tick() is
executed.

this would work for both miller's synchronous and my asynchronous
scheduler and is probably more elegant than the current solution.

drawback: external developers would have to change their externals to
improve the dsp/message interaction granularity for my asynchronous
scheduler...

off course, there are ugly workarounds for this (i just implemented
one), but i'd prefer to have a clean solution ...

i would be interested in other opinions ... especially in miller's

cheers .... tim

-- 
mailto:TimBlechmann at gmx.de    ICQ: 96771783
http://www.mokabar.tk

latest mp3: kMW.mp3
http://mattin.org/mp3.html

latest cd: Goh Lee Kwang & Tim Blechmann: Drone
http://www.geocities.com/gohleekwangtimblechmannduo/

After one look at this planet any visitor from outer space 
would say "I want to see the manager."
				      William S. Burroughs




More information about the Pd-dev mailing list