source: tests/src/test-fvec.c @ 11a1abe

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 11a1abe was c251b80, checked in by Paul Brossier <piem@piem.org>, 14 years ago

test-fvec.c: update

  • Property mode set to 100644
File size: 415 bytes
Line 
1#include <aubio.h>
2#include <assert.h>
3
4int main(){
5  uint_t buffer_size = 1024;
6  fvec_t * in = new_fvec (buffer_size);
7
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;
20}
21
Note: See TracBrowser for help on using the repository browser.