So here is what they told me, more or less paraphrased. It is more complicated than it should be, especially the whole pkg-config
thing: you should be able to simply specify some libraries and paths.
startquote:
Within a Projucer project, you’ll want to enable ‘JUCE_BELA’ in juce_audio_devices, and have ‘JUCE_ALSA’ disabled - the two don’t get on well and you get some weird state if you aren’t careful!
On your Linux Makefile Projucer target for Bela, you’ll want to specify the ‘pkg-config libraries’ with ‘bela libxenomai_native’.
I created pkgs to include the relevant paths and libraries for these two, and used that mechanism to get the right stuff in the bela build:
jenkins@bela:/usr/arm-linux-gnueabihf/lib/pkgconfig$ cat libxenomai_native.pc
prefix=/usr/arm-linux-gnueabihf/xenomai
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
XENO_BASE_CFLAGS=-I${includedir}/cobalt -I${includedir} -D_GNU_SOURCE -D_REENTRANT -D__COBALT__
XENO_BASE_LDFLAGS=-L${libdir} -lalchemy -lcopperplate -lcobalt -lmodechk -lpthread -lrt
Name: xenomai
Description: Xenomai native skin library
Version: 2.6.3
Libs: ${XENO_BASE_LDFLAGS}
Cflags: ${XENO_BASE_CFLAGS}
jenkins@bela:/usr/arm-linux-gnueabihf/lib/pkgconfig$ cat bela.pc
prefix=/usr/arm-linux-gnueabihf/Bela
libdir=${prefix}/lib
includedir=${prefix}/include
Name: bela
Description: Bela libraries
Version: 0.0.1
Cflags: -I${includedir}
Libs: -L${libdir} -lbela -lbelaextra -lNE10 -lseasocks
#Libs: -L${libdir} -lbelaextra -lbela -lNE10 -lprussdrv
Turns out we use the <alchemy/timer.h> to get timing info from our audio callback
that;s now in juce_core.cpp
We use rt_timer_read()
in the juce implementation of getHighResolutionTicks()
to make it callable from the rt audio callback
The digital I/O is actually enabled too, but i’ve not as yet mapped it anywhere useful, and I was thinking of making a stream of ints with the bits set, but there’s no obvious way of communicating which digital connections you want as input or output
endquote