}
}
} else {
+ if (wasonset == -1 && aubio_silence_detection(input, o->silence) == 0) {
+ //AUBIO_MSG("beginning of file is not silent, marking as onset\n",
+ // wasonset, aubio_silence_detection(input, o->silence));
+ isonset = 4;
+ wasonset = 0;
+ }
wasonset++;
}
o->wasonset->data[0] = wasonset;
o->minioi = 4;
o->silence = -70;
o->wasonset = new_fvec(1);
+ o->wasonset->data[0] = -1.;
o->samplerate = samplerate;
o->hop_size = hop_size;
o->pv = new_aubio_pvoc(buf_size, hop_size);