Changeset abd326c for tests/src/utils


Ignore:
Timestamp:
Mar 3, 2013, 7:42:39 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
7e35b37
Parents:
9ffcf83
Message:

tests/src/utils/: improve examples

Location:
tests/src/utils
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/src/utils/test-hist.c

    r9ffcf83 rabd326c  
    22
    33#include <aubio.h>
    4 #include <stdlib.h>
    54
    6 int main( )
     5int main ()
    76{
    87  uint_t length;
  • tests/src/utils/test-scale.c

    r9ffcf83 rabd326c  
    33#include <aubio.h>
    44
    5 int main(){
    6         /* allocate some memory */
    7         uint_t win_s      = 1024;                       /* window size */
    8         fvec_t * in       = new_fvec (win_s); /* input buffer */
    9         aubio_scale_t * o = new_aubio_scale(0,1,2,3);
    10         aubio_scale_set_limits (o,0,1,2,3);
    11         uint_t i = 0;
     5int main ()
     6{
     7  uint_t n = 0;
     8  uint_t win_s = 1024; // window size
     9  fvec_t * in = new_fvec (win_s); // input buffer
     10  aubio_scale_t * o = new_aubio_scale(0,1,2,3);
     11  aubio_scale_set_limits (o,0,1,2,3);
    1212
    13         while (i < 1000) {
    14           aubio_scale_do(o,in);
    15           i++;
    16         };
     13  while (n < 1000) {
     14    aubio_scale_do(o,in);
     15    n++;
     16  };
    1717
    18         del_aubio_scale(o);
    19         del_fvec(in);
     18  del_aubio_scale(o);
     19  del_fvec(in);
    2020
    21         return 0;
     21  return 0;
    2222}
Note: See TracChangeset for help on using the changeset viewer.