It looks like aubio is available on Debian, so if you can connect your board to the internet, you may be able to install it by simply
apt-get install -t jessie aubio-tools libaubio-dev libaubio-doc
where the -t jessie will install version 4.1
Then you should be able to include the header file from your project and then link to the library. You will need to pass additional flags to make through the IDE or through the build scripts
These options to make are relevant to your case (as given by make help)
LDFLAGS= -- linker flags (e.g.: -L. )
LDLIBS= -- libs to link in (e.g.: -lm )
Still, keep in mind a few caveats when using external libraries and calling external library's functions :
- if the library calls any system function that is not supported directly by xenomai, then you are going to get xenomai mode switches , which is going to degrade performance, and switch your process to non-realtime priority. If this happens in the audio thread, then you are going to have audio dropouts. To check for mode switches, enable the Xenomai stats in the IDE or, ssh into the board and run
watch cat /proc/xenomai/stat
and check the MSW column. That should NEVER increase for the bela_audio thread
- if you are calling functions that require occasional bursts of CPU usage, then these should not run in the audio thread. For instance, think of an FFT, where you have to fill the buffer for each new sample and then, when the buffer is full, you have to process the FFT. Filling the buffer is very cheap, processing the FFT is very expensive. Filling the buffer takes place for every sample, the FFT is processed every few audio blocks (e,g,: a 1024-sample FFT would be processed every 64 audio blocks, assuming a blocksize of 16 samples and no overlap). It is unlikely that the CPU would be able to process that long FFT within the time of a single audio callback (bear in mind that 16 samples per blocks means that the render() function needs to be executed in about 363microseconds (16/44100 = 363). This means your audio would glitch, dropping a few audio blocks while it is busy processing teh FFT.
You will want to run functions that run occasionally and take long to execute in an AuxiliaryTask. This allows to split the CPU load across a longer period of time so that you are not bound to the duration of a single render() callback. See for instance the 04-Audio/FFT-phase-vocoder example.
As a final note, the library as you get it with apt-get is not necessarily going to take full advantage of the NEON FPU of the Cortex A8, so it may be worth re-compiling it with the "usual" optimized compiler flags, but you will want to give a try to the library as it is to check that all of the above works fine for you and then you can recompile it to give it the final performance boost (if at all) when you see it works reasonably fine.