[PD-dev] scheduling: clocks & audio
rbsheehan at yahoo.com
Thu Aug 21 12:47:31 CEST 2003
Hi guenter, thanks for your reply.
Ok, that's what I had figured from the documentation.
Which is why I'm confused - I have a function that is
called by a clock every 20ms, and it takes 8-9 ms to
execute. Audio seems to be produced fine, and the
function seems to do its job. I only get problems if I
try to decrease the interval between calls to the
function to less than the execution time of the
function (which makes sense).
This seems inconsistent with my understanding of
scheduling... unless i've made a mistake timing the
function - i've been using gettimeofday() (under Mac
--- guenter geiger <geiger at xdv.org> wrote:
> On Wed, 20 Aug 2003, Brian Sheehan wrote:
> > Hi,
> > I want to ask a general question in relation
> > scheduling in pd. I've tried looking at the docs
> > source code, but I'm still confused.
> > >From the docs, audio is computed every 64
> samples, so
> > with a sample rate of 44100 this means that 64
> > of output must be computed every 1.45 ms.
> > So my question is, if I have a clock object that
> > a function say every 20ms, and this function takes
> > 10ms to complete, how is audio interleaved with
> > execution of this function? Another way of
> > this would be: are functions that are called by
> > executed atomically? Doesn't seem that they can
> > unless they execute in less than 1.45 ms.
> > any thoughts/explanations are appreciated (i've a
> > feeling they might radically change my
> > of how pd works!!)
> Well, yes. you better write functions that take less
> 1.45 ms to finish, .. .much less. PD is not
> multithreaded or
> asynchron, thats what makes messages deterministic
> wrt to the
> audio processing.
> > Brian
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.yahoo.com
> > _______________________________________________
> > PD-dev mailing list
> > PD-dev at iem.at
> > http://iem.at/cgi-bin/mailman/listinfo/pd-dev
> PD-dev mailing list
> PD-dev at iem.at
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
More information about the Pd-dev