[PD-dev] long lasting operations

Tim Blechmann TimBlechmann at gmx.net
Sun Dec 21 18:34:55 CET 2003


> Since PD has a global thread lock now, the other (probably more
> comfortable) way would be to use threading for longer-lasting
> operations, and i'd really like to adapt soundfiler and other objects
> accordingly. The problem with any asynchronous array operation is that
> there has to be a mechanism to avoid concurrent changing of table
> sizes by two separate objects (e.g. when one soundfiler is reading
> data into the array, another one must not resize the same array)...
> consequently there has to be some kind of "array lock" or even a queue
> of operations scheduled for execution, because i don't think that
> operations should just fail... or are there any other ideas how to do
> it?
i don't know, how the audio arrays are implemented in pd, but it might
be useful to use a class similar to c++'s vector class ...
if a new operation occurs, such as loading a file with soundfiler, the
array 'class' has to allocate a new array, read the soundfile threaded
to the new array, and change all pointers to the new array, the old one
can be freed now...
the problem is, that it's much more difficult to access an array, since
all internals/externals would have to refer to the 'array'-class,
instead having direct access to the array in memory...

my 2¢...

 Tim                          mailto:TimBlechmann at gmx.de
                              ICQ: 96771783
                              http://www.nyds-exp-discogs.tk
--
The only people for me are the mad ones, the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn,
burn, like fabulous yellow roman candles exploding like spiders across
the stars and in the middle you see the blue centerlight pop and
everybody goes "Awww!"
                                                          Jack Kerouac





More information about the Pd-dev mailing list