(Sending again with correct subject line. :P)
Note, there is Peter's C atomics ringbuffer.c implementation from libpd now in the Pd sources. It's limited to lengths of a multiple of 256 bytes I believe but easy to use.
I have used it successfully in the iOS Audio Unit to handle differing input and output buffer sizes due to sample rate conversion outside libpd.
On Jul 25, 2021, at 12:00 PM, pd-list-request@lists.iem.at mailto:pd-list-request@lists.iem.at wrote:
If my analysis is correct (if not, please let me know!), I think the Jack backend should really adapt the lock-free FIFO from the Portaudio backend.
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
There's also the "ring buffer" stuff in s_audio_paring.c - it's quite general and well written. Byte stream oriented.
cheers M
On Mon, Jul 26, 2021 at 12:46:43PM +0200, Dan Wilcox wrote:
(Sending again with correct subject line. :P)
Note, there is Peter's C atomics ringbuffer.c implementation from libpd now in the Pd sources. It's limited to lengths of a multiple of 256 bytes I believe but easy to use.
I have used it successfully in the iOS Audio Unit to handle differing input and output buffer sizes due to sample rate conversion outside libpd.
On Jul 25, 2021, at 12:00 PM, pd-list-request@lists.iem.at mailto:pd-list-request@lists.iem.at wrote:
If my analysis is correct (if not, please let me know!), I think the Jack backend should really adapt the lock-free FIFO from the Portaudio backend.
Dan Wilcox @danomatika <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_danomatika&a... > danomatika.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__danomatika.com_&d=Dw... > robotcowboy.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__robotcowboy.com_&d=D... >
Peter’s ringbuffer.c works with arbitrary input and output lengths. I think the 256 sizing is required when allocating.
If s_audio_paring.c is generalized already, maybe it can become s_audio_ring.c and used in the other audio backends, as suggested by Christof.
Dan Wilcox danomatika.com robotcowboy.com
On Jul 26, 2021, at 6:53 PM, Miller Puckette msp@ucsd.edu wrote:
There's also the "ring buffer" stuff in s_audio_paring.c - it's quite general and well written. Byte stream oriented.
cheers M
On Mon, Jul 26, 2021 at 12:46:43PM +0200, Dan Wilcox wrote: (Sending again with correct subject line. :P)
Note, there is Peter's C atomics ringbuffer.c implementation from libpd now in the Pd sources. It's limited to lengths of a multiple of 256 bytes I believe but easy to use.
I have used it successfully in the iOS Audio Unit to handle differing input and output buffer sizes due to sample rate conversion outside libpd.
On Jul 25, 2021, at 12:00 PM, pd-list-request@lists.iem.at mailto:pd-list-request@lists.iem.at wrote:
If my analysis is correct (if not, please let me know!), I think the Jack backend should really adapt the lock-free FIFO from the Portaudio backend.
Dan Wilcox @danomatika <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_danomatika&a... > danomatika.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__danomatika.com_&d=Dw... > robotcowboy.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__robotcowboy.com_&d=D... >
--