Changeset e1d9cc3 for src/mathutils.c


Ignore:
Timestamp:
Sep 6, 2017, 1:50:16 PM (2 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master
Children:
82f0effd
Parents:
34dca87
Message:

src/mathutils.c: add window type 'ones'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.c

    r34dca87 re1d9cc3  
    2929typedef enum
    3030{
     31  aubio_win_ones,
    3132  aubio_win_rectangle,
    3233  aubio_win_hamming,
     
    6465      AUBIO_ERR ("window type can not be null.\n");
    6566      return 1;
    66   } else if (strcmp (window_type, "rectangle") == 0)
     67  } else if (strcmp (window_type, "ones") == 0)
     68      wintype = aubio_win_ones;
     69  else if (strcmp (window_type, "rectangle") == 0)
    6770      wintype = aubio_win_rectangle;
    6871  else if (strcmp (window_type, "hamming") == 0)
     
    8992  }
    9093  switch(wintype) {
     94    case aubio_win_ones:
     95      fvec_ones(win);
     96      break;
    9197    case aubio_win_rectangle:
    92       for (i=0;i<size;i++)
    93         w[i] = 0.5;
     98      fvec_set_all(win, .5);
    9499      break;
    95100    case aubio_win_hamming:
Note: See TracChangeset for help on using the changeset viewer.