Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making audio drivers available in R?

Tags:

r

driver

audio

I'm trying to use the following sound package in R: http://playitbyr.r-forge.r-project.org/gettingstarted.html

After installing the package and its dependencies, when I try to run

sonify(iris, sonaes(time = Petal.Length, pitch = Petal.Width))

(per the example given on the page), I get this error:

Error in play.default(x, rate, ...) : no audio drivers are available

Anyone know what I should do? I googled around a bit, and it looks like maybe I need to call set.audio.driver(name), but I'm not sure what to put as an argument.

(In case it matters, on Mac OS X Snow Leopard.)

like image 314
grautur Avatar asked Jul 23 '11 18:07

grautur


1 Answers

On ubuntu, you can get the portaudio headers with

sudo apt-get install portaudio19-dev

Then, reinstall the audio library. Make sure you see

checking portaudio.h usability... yes
checking portaudio.h presence... yes

During compilation of the audio package.

like image 153
Rorschach Avatar answered Oct 11 '22 17:10

Rorschach