Skip to content

Platforms_RaspberryPi

Wiki converter edited this page Sep 24, 2020 · 6 revisions

PortAudio on Raspberry Pi

Please make sure that ALSA audio is working before trying to use PortAudio. I recommend starting with the analog headphone jack. Here are two blogs that can get you started:

http://karuppuswamy.com/wordpress/2015/08/15/configuring-alsa-audio-output-on-analog-and-hdmi-of-raspberry-pi/ http://cagewebdev.com/index.php/raspberry-pi-getting-audio-working/

You can compile PortAudio directly on the Raspberry Pi.

PortAudio uses ALSA. So you will need to install the ALSA developer library sudo apt-get install libasound-dev

I recommend using the nightly snapshot of PortAudio V19 from http://www.portaudio.com/download.html

Then compile PortAudio and the examples.

cd portaudio
./configure
make

You can execute some examples in the bin folder:

bin/pa_devs
bin/paex_sine

Note that the default latency may be too low: #246

You may see lots of errors like this: ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front

They can be safely ignored. That is a known issue: #163

Also note that: Alberto di Bene reported that he had to link with -lgcc to avoid linker errors when statically linking with libportaudio.a on Raspbian.

Clone this wiki locally