Changeset c251b80 for tests/src


Ignore:
Timestamp:
Jun 3, 2010, 1:07:33 AM (15 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:
d314636
Parents:
883deec
Message:

test-fvec.c: update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/src/test-fvec.c

    r883deec rc251b80  
    11#include <aubio.h>
     2#include <assert.h>
    23
    34int main(){
    4         /* allocate some memory */
    5         uint_t win_s      = 1024;                       /* window size */
    6         fvec_t * in       = new_fvec (win_s); /* input buffer */
    7         del_fvec(in);
     5  uint_t buffer_size = 1024;
     6  fvec_t * in = new_fvec (buffer_size);
    87
    9         return 0;
     8  assert( in->length                == buffer_size);
     9
     10  assert( in->data[0]               == 0);
     11  assert( in->data[buffer_size / 2] == 0);
     12  assert( in->data[buffer_size - 1] == 0);
     13
     14  in->data[buffer_size -1 ] = 1;
     15  assert( in->data[buffer_size - 1] == 1);
     16
     17  del_fvec(in);
     18
     19  return 0;
    1020}
    1121
Note: See TracChangeset for help on using the changeset viewer.