History

tests/src/utils/: improve examples

Paul Brossier committed 13 years ago

Commit abd326c1 parent 9ffcf832 files · +15 −16Browse files

Showing the changes to tests/src/utils (2 of 2 files). Show all

Unified · Split

2 files
  1. tests/src/utils/test-hist.c +1 −2
  2. tests/src/utils/test-scale.c +14 −14
tests/src/utils/test-hist.c+1−2
@@ -1,9 +1,8 @@
1#define AUBIO_UNSTABLE 11#define AUBIO_UNSTABLE 1
2 2
3#include <aubio.h>3#include <aubio.h>
4#include <stdlib.h>
5 4
6int main( )5int main ()
7{6{
8 uint_t length;7 uint_t length;
9 for (length = 1; length < 10; length ++ ) {8 for (length = 1; length < 10; length ++ ) {
tests/src/utils/test-scale.c+14−14
@@ -2,21 +2,21 @@ · 1 unmodified line
2 2
3#include <aubio.h>3#include <aubio.h>
4 4
5int main(){5int main ()
6 /* allocate some memory */6{
7 uint_t win_s = 1024; /* window size */7 uint_t n = 0;
8 fvec_t * in = new_fvec (win_s); /* input buffer */8 uint_t win_s = 1024; // window size
9 aubio_scale_t * o = new_aubio_scale(0,1,2,3);9 fvec_t * in = new_fvec (win_s); // input buffer
10 aubio_scale_set_limits (o,0,1,2,3);10 aubio_scale_t * o = new_aubio_scale(0,1,2,3);
11 uint_t i = 0;11 aubio_scale_set_limits (o,0,1,2,3);
12 12
13 while (i < 1000) {13 while (n < 1000) {
14 aubio_scale_do(o,in);14 aubio_scale_do(o,in);
15 i++;15 n++;
16 };16 };
17 17
18 del_aubio_scale(o);18 del_aubio_scale(o);
19 del_fvec(in);19 del_fvec(in);
20 20
21 return 0;21 return 0;
22}22}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t