Closed jarmitage closed 6 years ago
You need to add three lines to the main.cpp
file, as per this commit:
Not sure why that main.cpp
is needed anyhow, @belangeo ? Do you require the Bela blocksize to be 32?
If all you need is to specify some extra default settings, I'd recommend you get rid of the main.cpp
file and set the default settings in a function
void Bela_userSettings(BelaInitSettings *settings)
inside render.cpp
, e.g.:
void Bela_userSettings(BelaInitSettings *settings)
{
settings->periodSize = 32;
settings->numAnalogInChannels = 8;
settings->numAnalogOutChannels = 8;
settings->analogOutputsPersist = 0;
}
(the last setting was not included in @belangeo's main.cpp
, but it saves a bit of memory copying, which could be helpful).
In case you are willing to re-factor slightly the code in render()
, you could also add
settings->uniformSampleRate = 1;
, so that the analog channels are resampled in the backend and come into render()
at the same rate as the audio channels.
Last, looking forward a couple of weeks to the release of Bela Mini, you want to make sure it all works fine when there are no analog out channels. In particular line
pyo.analogout(context->analogOut);
in render.cpp
will have to be conditionally excluded (as analogOut will be NULL). Not sure if this is going to break anything inside pyo
though?
Can confirm that adding those three lines fixes, thanks
All done! Thanks Giulio for the hints!
Following the README as far as
root@bela:~/Bela/scripts# ./build_pyo.sh ../../pyo-bela/examples/music-box.py ../../pyo-bela/common/
I'm guessing something has probably changed since
v0.1.0a stable 2016.07.23
? @giuliomoro