Thank you. Big help.
Another question the sampling of Bela changes abnormally after I tried to introduce down sampling ( like sampling one for each 8 samples). All the analog and audio sampling for current case is 44.1kHz. When I log them to scope the sampling from the time interval is observed to be multiples of 44.1kHz i.e. 3 times, 12 times. I have attached the outline of my code below for the render part.
` void render(BelaContext *context, void *userData) {
for (unsigned int n = 0; n < context->audioFrames; n++) {
// Analog read from channel 0 and 1
. . .
. . .
// Apply filters
. . .
. . .
// Initialize some variables
. . .
. . .
// Down sampling
if (n % m == 0) {
// m is the downsampling index which actually controls how much actual sample to be skipped
// Do all necessary things
. . . . .
. . . . .
}
// Audio write with filtering
. . . .
// Scope values out
. . . . . .
}}`
Here you can see the sampling is 3 times 44.1kHz. ### Current audio frame size is 256 and m=16.