I've just had a quick look at some of the code without following thoroughly. But I found this:
#define MAX_IN_USE 8
int buf[MAX_IN_USE * 4] = { 0 }; // int buf[32]
/*
* Overrrides the current buffer content
*
* Parameter arr: 1d array containing the new buffer content
*/
void setWholeBuffer(int* arr) {
for (int x = 0; x < (MAX_IN_USE * 8); x++) { => 64 iterations
Serial.print("|");
Serial.print(buf[x]);
Serial.print(":");
buf[x] = arr[x]; // overflow here int buf[32] to buf[63] ??
Serial.print(buf[x]);
}
}
Also, you are aware that an int on an ESP8266 is 4 bytes ?