[PD-dev] outlet_anything() & threads

Hans-Christoph Steiner hans at eds.org
Mon May 15 13:42:58 CEST 2006


This sounds like you are wrtiing a [libusb] object, which would be very 
nice.

I have a different suggestion, related to the question I just posted. 
What about not using a thread at all, and instead having the first 
instance executed get the data from the USB bus, and stick it in an array. 
Then every other instance set to read the same device will just output the 
data from that array.  This relies on the OS doing some buffering, which 
in the case of HID, GNU/Linux, Mac OS X, and Windows already do.

.hc

On Tue, 2 May 2006, Christian Klippel wrote:

> hi all,
>
> can anyone confirm that using outlet_anything() inside a thread is safe?
> just wrote a little object that reads a usb device in a thread, and send to
> the outlets from there directly via outlet_anything() .... so far it doesnt
> crash or anything, it just works (of course there are some objects connected
> to them), altough its only a few route's and slider/bangs/toggles connected.
>
> since the thing does peak detection, there is a hell lot of toggles comming
> in, plus some faders ... so its really quite some traffic ....
>
> but i want to make sure that i can do it that way, and not that there are any
> surprises later when doing that ...
>
> thanks,
>
> chris
>
>
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
>

 	zen
 	   \
 	    \
 	     \




More information about the Pd-dev mailing list