The de-interleaving mode has been implemented. Just set:
settings->uniformSampleRate = 1;
settings->interleave = 0;
settings->analogOutputsPersist = 0;
where, in addition, uniformSampleRate
resamples the analog channels in the backend to match the audio sample rate and analogOutputPersist
saves some memory operations when the analog outputs are written continuously.
You can do the above either before calling Bela_initAudio()
, example here, or - if that's inconvenient - you can implement a function Bela_userSettings()
, example here.
Once the interleave
has been applied correctly, you will see that the BELA_FLAG_INTERLEAVED
bit will be cleared in context->flags
: assert((context->flags & BELA_FLAG_INTERLEAVED) == 0);
, once the uniformSampleRate
has been applied correctly, you will see that context->audioSampleRate == context->analogSampleRate
.
Also have a look here.