Hi,
I just joined the list as I am working on porting libpd for the Bela platform http://bela.io . Bela uses the xenomai real-time environment and as such we need to take all the file and network I/O out of the audio thread (which sounds like a good thing anyhow), also because we run the system at small blocksizes. Actually I got most things working, taking sys_microsleep() and the associate reading of files and sockets out from the audio thread (actually I made it available through the API, so that the application can call libpd_sys_microsleep() from a separate thread if they want to), so now I can run it at 8samples per block (1.3ms roundtrip latency) on the Beaglebone Black that powers Bela. https://github.com/giuliomoro/libpd/tree/bela
I am now looking at the [netsend] object, which still runs in the audio thread. The notes.txt file that came with this version of pd says
More features: netsend separate thread
So, I want to get [netsend] out of the audio thread. As this is the first time I have a look at Pd code, I want to ask here, before I start working on it: any reason why this has not been done before? Best, Giulio
On Mon, 2016-04-04 at 14:19 +0000, Giulio Moro via Pd-dev wrote:
Hi,
I just joined the list as I am working on porting libpd for the Bela platform http://bela.io . Bela uses the xenomai real-time environment and as such we need to take all the file and network I/O out of the audio thread (which sounds like a good thing anyhow), also because we run the system at small blocksizes. Actually I got most things working, taking sys_microsleep() and the associate reading of files and sockets out from the audio thread (actually I made it available through the API, so that the application can call libpd_sys_microsleep() from a separate thread if they want to), so now I can run it at 8samples per block (1.3ms roundtrip latency) on the Beaglebone Black that powers Bela. https://github.com/giuliomoro/libpd/tree/bela
I am now looking at the [netsend] object, which still runs in the audio thread. The notes.txt file that came with this version of pd says
More features: netsend separate thread
So, I want to get [netsend] out of the audio thread. As this is the first time I have a look at Pd code, I want to ask here, before I start working on it: any reason why this has not been done before?
I don't know whether externals can be used with libpd now, but I do know that iemnet[1] has threaded networking classes.
[1] https://github.com/umlaeute/pd-iemnet
Roman