compiling PortAudio for BeagleBoard XM

Instructions for cross compiling PortAudio for a BeagleBoard XM

PortAudio is an easy to use cross platform audio API for that looks the
same on Mac, Windows, Linux, etc. More info on PortAudio here:

    <http://www.portaudio.com/>

I started with a BeagleBoard XM Rev C1 running the Angstrom demo.

I then installed Ubuntu 11.10 on my Mac as a VMWare application:

    <http://www.trendsigma.net/vmware/ubuntu1110t.html>

Installed ALSA development packet for the BeagleBoard target into my
cross compiler toolchain. In Ubuntu Linux enter:

    su -
    source /usr/local/angstrom/arm/environment-setup
    opkg-target update
    opkg-target install alsa-dev

I then downloaded the nightly snapshot of PortAudio V19 from:

    <http://www.portaudio.com/download.html>

to a Work directory in a user account on Ubuntu.

Then I compiled it by entering in Ubuntu Linux:

    cd ~/Work/portaudio

# the following is all on one line
CFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
./configure --host=arm-angstrom-linux-gnueabi
--prefix=/usr/local/angstrom/arm --disable-shared

    make
    ls bin

You should end up with a bunch of test files in the bin folder.
I copied a test file from Ubuntu to my BeagleBoard using scp. You will
need to change the IP address and account name to match your setup.

   scp bin/paex_sine phil@192.168.1.120:/home/phil/.

Then on the BeagleBoard, as root, I entered:

   cd ~phil
   ./paex_sine

If you have speakers hooked up, then you should hear a sine wave play
for 5 seconds.

For your cross compiled BeagleBoard project, link directly with the
static library:

    lib/.libs/libportaudio.a

If you have suggestions or corrections, please let me know.

Phil Burk
www.softsynth.com

Why not use the prebuilt portaudio in the angstrom feeds?

Phil Burk wrote:
>> Instructions for cross compiling PortAudio for a BeagleBoard XM

> Why not use the prebuilt portaudio in the angstrom feeds?

Aargh! This is like climbing a mountain and finding a parking lot at the
top.

What prebuilt portaudio? When I googled "portaudio beagleboard" all I
saw was emails from people trying to build it.

Can you please send a link that describes this prebuilt portaudio and
how to use it? I will add some notes to the PortAudio website.

I tried: opkg install portaudio
but got "Unknown package 'portaudio'.".

Oh well. It was still a useful exercise. These notes may be helpful if
we are trying to debug PortAudio on BeagleBoard.

Thanks,
Phil Burk