if ((sfinfo.samplerate*buffersizems)%1000) {
printf("Please fine tune the buffersize according to the sample rate\n");
//close file
if ((sfinfo.samplerate*buffersizems)%1000) {
printf("Please fine tune the buffersize according to the sample rate\n");
//close file
//maybe here wait for all cores to output before going on
for (int idxcpu = 0; idxcpu < numCPU; idxcpu++) {
pthread_join(tid[idxcpu], NULL);
//maybe here wait for all cores to output before going on
for (int idxcpu = 0; idxcpu < numCPU; idxcpu++) {
pthread_join(tid[idxcpu], NULL);
if (worker_id != 0) { // worker_id = 0 means the number of samples was divisible through the number of cpus
for (int idxcpu = 0; idxcpu < worker_id; idxcpu++) { //worker_id is at this point one unit more than threads launched
pthread_join(tid[idxcpu], NULL);
if (worker_id != 0) { // worker_id = 0 means the number of samples was divisible through the number of cpus
for (int idxcpu = 0; idxcpu < worker_id; idxcpu++) { //worker_id is at this point one unit more than threads launched
pthread_join(tid[idxcpu], NULL);