ref: acf7d3045a0f9ce6157b2ddfa26224f5e4a17460
parent: c0b295c7380f35851e124b0cedd01e7620725bec
author: Paul Brossier <piem@piem.org>
date: Thu Oct 1 22:10:25 EDT 2009
src/mathutils.c and co: use 0.0, not 0.0f
--- a/src/aubio_priv.h
+++ b/src/aubio_priv.h
@@ -182,8 +182,8 @@
#endif
/* handy shortcuts */
-#define DB2LIN(g) (POW(10.0f,(g)*0.05f))
-#define LIN2DB(v) (20.0f*LOG10(v))
+#define DB2LIN(g) (POW(10.0,(g)*0.05f))
+#define LIN2DB(v) (20.0*LOG10(v))
#define SQR(_a) (_a*_a)
#define MAX(a,b) ( a > b ? a : b)
--- a/src/mathutils.c
+++ b/src/mathutils.c
@@ -85,7 +85,7 @@
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];
@@ -94,7 +94,7 @@
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];
@@ -103,7 +103,7 @@
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];
@@ -132,7 +132,7 @@
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;
@@ -143,7 +143,7 @@
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];
--- a/src/onset/onsetdetection.c
+++ b/src/onset/onsetdetection.c
@@ -97,7 +97,7 @@
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] =
@@ -108,7 +108,7 @@
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];
@@ -129,7 +129,7 @@
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])
@@ -137,7 +137,7 @@
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];
}
@@ -229,13 +229,13 @@
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:
--- a/src/utils/hist.c
+++ b/src/utils/hist.c
@@ -148,7 +148,7 @@
smpl_t aubio_hist_mean (aubio_hist_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->nelems; j++)
tmp += s->hist->data[i][j];
--- a/src/utils/scale.c
+++ b/src/utils/scale.c
@@ -56,7 +56,7 @@
s->olow = olow;
s->ohig = ohig;
if (inputrange == 0) {
- s->scaler = 0.0f;
+ s->scaler = 0.0;
} else {
s->scaler = outputrange/inputrange;
if (inputrange < 0) {