Changeset acf7d30


Ignore:
Timestamp:
Oct 2, 2009, 2:10:25 AM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
1498ced
Parents:
c0b295c
Message:

src/mathutils.c and co: use 0.0, not 0.0f

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/aubio_priv.h

    rc0b295c racf7d30  
    183183
    184184/* handy shortcuts */
    185 #define DB2LIN(g) (POW(10.0f,(g)*0.05f))
    186 #define LIN2DB(v) (20.0f*LOG10(v))
     185#define DB2LIN(g) (POW(10.0,(g)*0.05f))
     186#define LIN2DB(v) (20.0*LOG10(v))
    187187#define SQR(_a)   (_a*_a)
    188188
  • src/mathutils.c

    rc0b295c racf7d30  
    8686smpl_t fvec_mean(fvec_t *s) {
    8787  uint_t i,j;
    88   smpl_t tmp = 0.0f;
     88  smpl_t tmp = 0.0;
    8989  for (i=0; i < s->channels; i++)
    9090    for (j=0; j < s->length; j++)
     
    9595smpl_t fvec_sum(fvec_t *s) {
    9696  uint_t i,j;
    97   smpl_t tmp = 0.0f;
     97  smpl_t tmp = 0.0;
    9898  for (i=0; i < s->channels; i++)
    9999    for (j=0; j < s->length; j++)
     
    104104smpl_t fvec_max(fvec_t *s) {
    105105  uint_t i,j;
    106   smpl_t tmp = 0.0f;
     106  smpl_t tmp = 0.0;
    107107  for (i=0; i < s->channels; i++)
    108108    for (j=0; j < s->length; j++)
     
    133133uint_t fvec_max_elem(fvec_t *s) {
    134134  uint_t i,j=0, pos=0.;
    135   smpl_t tmp = 0.0f;
     135  smpl_t tmp = 0.0;
    136136  for (i=0; i < s->channels; i++)
    137137    for (j=0; j < s->length; j++) {
     
    144144void fvec_shift(fvec_t *s) {
    145145  uint_t i,j;
    146   //smpl_t tmp = 0.0f;
     146  //smpl_t tmp = 0.0;
    147147  for (i=0; i < s->channels; i++)
    148148    for (j=0; j < s->length / 2 ; j++) {
  • src/onset/onsetdetection.c

    rc0b295c racf7d30  
    9898  uint_t nbins = fftgrain->length;
    9999  for (i=0;i<fftgrain->channels; i++)  {
    100     onset->data[i][0] = 0.0f;
     100    onset->data[i][0] = 0.0;
    101101    o->dev1->data[i][0]=0.;
    102102    for ( j=0;j<nbins; j++ )  {
     
    109109        o->dev1->data[i][j] = ABS(o->dev1->data[i][j]);
    110110      else
    111         o->dev1->data[i][j] = 0.0f;
     111        o->dev1->data[i][j] = 0.0;
    112112      /* keep a track of the past frames */
    113113      o->theta2->data[i][j] = o->theta1->data[i][j];
     
    130130  uint_t nbins = fftgrain->length;
    131131  for (i=0;i<fftgrain->channels; i++)  {
    132     onset->data[i][0] = 0.0f;
     132    onset->data[i][0] = 0.0;
    133133    for (j=0;j<nbins; j++)  {
    134134      o->dev1->data[i][j] = SQRT(
     
    138138        o->dev1->data[i][j] = ABS(o->dev1->data[i][j]);
    139139      else
    140         o->dev1->data[i][j] = 0.0f;
     140        o->dev1->data[i][j] = 0.0;
    141141      o->oldmag->data[i][j] = fftgrain->norm[i][j];
    142142    }
     
    230230      o->theta1 = new_fvec(rsize,channels);
    231231      o->theta2 = new_fvec(rsize,channels);
    232       o->histog = new_aubio_hist(0.0f, PI, 10, channels);
     232      o->histog = new_aubio_hist(0.0, PI, 10, channels);
    233233      o->threshold = 0.1;
    234234      break;
     
    236236      o->oldmag = new_fvec(rsize,channels);
    237237      o->dev1   = new_fvec(rsize,channels);
    238       o->histog = new_aubio_hist(0.0f, PI, 10, channels);
     238      o->histog = new_aubio_hist(0.0, PI, 10, channels);
    239239      o->threshold = 0.1;
    240240      break;
  • src/utils/hist.c

    rc0b295c racf7d30  
    149149smpl_t aubio_hist_mean (aubio_hist_t *s) {
    150150  uint_t i,j;
    151   smpl_t tmp = 0.0f;
     151  smpl_t tmp = 0.0;
    152152  for (i=0; i < s->channels; i++)
    153153    for (j=0; j < s->nelems; j++)
  • src/utils/scale.c

    rc0b295c racf7d30  
    5757  s->ohig = ohig;
    5858  if (inputrange == 0) {
    59     s->scaler = 0.0f;
     59    s->scaler = 0.0;
    6060  } else {
    6161    s->scaler = outputrange/inputrange;
Note: See TracChangeset for help on using the changeset viewer.