smpl_t fvec_mean(fvec_t *s) {
uint_t i,j;
- smpl_t tmp = 0.0f;
+ smpl_t tmp = 0.0;
for (i=0; i < s->channels; i++)
for (j=0; j < s->length; j++)
tmp += s->data[i][j];
smpl_t fvec_sum(fvec_t *s) {
uint_t i,j;
- smpl_t tmp = 0.0f;
+ smpl_t tmp = 0.0;
for (i=0; i < s->channels; i++)
for (j=0; j < s->length; j++)
tmp += s->data[i][j];
smpl_t fvec_max(fvec_t *s) {
uint_t i,j;
- smpl_t tmp = 0.0f;
+ smpl_t tmp = 0.0;
for (i=0; i < s->channels; i++)
for (j=0; j < s->length; j++)
tmp = (tmp > s->data[i][j])? tmp : s->data[i][j];
uint_t fvec_max_elem(fvec_t *s) {
uint_t i,j=0, pos=0.;
- smpl_t tmp = 0.0f;
+ smpl_t tmp = 0.0;
for (i=0; i < s->channels; i++)
for (j=0; j < s->length; j++) {
pos = (tmp > s->data[i][j])? pos : j;
void fvec_shift(fvec_t *s) {
uint_t i,j;
- //smpl_t tmp = 0.0f;
+ //smpl_t tmp = 0.0;
for (i=0; i < s->channels; i++)
for (j=0; j < s->length / 2 ; j++) {
//tmp = s->data[i][j];
uint_t i, j;
uint_t nbins = fftgrain->length;
for (i=0;i<fftgrain->channels; i++) {
- onset->data[i][0] = 0.0f;
+ onset->data[i][0] = 0.0;
o->dev1->data[i][0]=0.;
for ( j=0;j<nbins; j++ ) {
o->dev1->data[i][j] =
if ( o->threshold < fftgrain->norm[i][j] )
o->dev1->data[i][j] = ABS(o->dev1->data[i][j]);
else
- o->dev1->data[i][j] = 0.0f;
+ o->dev1->data[i][j] = 0.0;
/* keep a track of the past frames */
o->theta2->data[i][j] = o->theta1->data[i][j];
o->theta1->data[i][j] = fftgrain->phas[i][j];
uint_t i, j;
uint_t nbins = fftgrain->length;
for (i=0;i<fftgrain->channels; i++) {
- onset->data[i][0] = 0.0f;
+ onset->data[i][0] = 0.0;
for (j=0;j<nbins; j++) {
o->dev1->data[i][j] = SQRT(
ABS(SQR( fftgrain->norm[i][j])
if (o->threshold < fftgrain->norm[i][j] )
o->dev1->data[i][j] = ABS(o->dev1->data[i][j]);
else
- o->dev1->data[i][j] = 0.0f;
+ o->dev1->data[i][j] = 0.0;
o->oldmag->data[i][j] = fftgrain->norm[i][j];
}
o->dev1 = new_fvec(rsize,channels);
o->theta1 = new_fvec(rsize,channels);
o->theta2 = new_fvec(rsize,channels);
- o->histog = new_aubio_hist(0.0f, PI, 10, channels);
+ o->histog = new_aubio_hist(0.0, PI, 10, channels);
o->threshold = 0.1;
break;
case aubio_onset_specdiff:
o->oldmag = new_fvec(rsize,channels);
o->dev1 = new_fvec(rsize,channels);
- o->histog = new_aubio_hist(0.0f, PI, 10, channels);
+ o->histog = new_aubio_hist(0.0, PI, 10, channels);
o->threshold = 0.1;
break;
case aubio_onset_kl: