[PD] PD-list Digest, Vol 27, Issue 78
Mathieu Bouchard
matju at artengine.ca
Sat Jun 16 05:37:54 CEST 2007
On Fri, 15 Jun 2007, patco wrote:
>> On Fri, 2007-06-15 at 20:25 +0200, Patco wrote:
>> i didn't find a (good) way yet to transmit binary files within pd. do
>> you know of any way?
> The only way I know to reload a binary file is like eni said rebooting
> pd, I believe that this process would decrease external devel'n'debug
> time and allow fast and clean updates.
You have to distinguish between binary and binary.
Originally binary was an adjective meaning "made of two parts" or "between
two things" and similar things. Then it became a noun and began to refer
to base 2 encoding. Then it referred to non-ASCII files, and then it
referred also to machine code files (back in early UNIX, most non-ASCII
files were machine code files)
If you want to reload .so files, it's not impossible, pd would have to
keep track of each dlopen() and match it with a dlclose() when necessary.
However, that's not enough to effectively have reloadable externals: the
big problem is that pd doesn't have an "unsetup" function so the external
cannot take appropriate actions in shutting itself down, and many
externals wouldn't take it so well if you did that to them. Even worse, pd
doesn't have an opposite of class_new(), so it can't remove references to
code that gets unloaded. There would also have to be a way to track down
objects so that they get "unloaded" in a proper way too, before the class
itself gets destroyed, else that'll be a bunch of dangling pointers too.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
More information about the Pd-list
mailing list