[Rd] defining r audio connections

irederik m@iii@g oii oib@@et irederik m@iii@g oii oib@@et
Wed May 6 21:26:07 CEST 2020

On Wed, May 06, 2020 at 02:26:34PM -0400, Duncan Murdoch wrote:
>On 06/05/2020 1:09 p.m., frederik using ofb.net wrote:
>>I only want an object that I can use `readBin` and `writeBin` on, to read and write audio data using e.g. `snd_pcm_writei` which is part of the `alsa-lib` package.
>I don't think R supports user-defined connections, but probably 
>writing readBin and writeBin equivalents specific to your library 
>wouldn't be any harder than creating a connection.  For those, you 
>will probably want to work with an "external pointer" (see Writing R 
>Extensions). Rcpp probably has support for these if you're working in 

Thank you, yes I was following


which uses XPtr.

I'll forget about making a connection, if it is not supported.

I had this idea that I would be able to use the same code for writing to a file as to an audio device, but I can create my own class for that.


More information about the R-devel mailing list