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 @@
11 #define AUBIO_UNSTABLE 1
22
33 #include <aubio.h>
4−#include <stdlib.h>
54
6−int main( )
5+int main ()
76 {
87 uint_t length;
98 for (length = 1; length < 10; length ++ ) {
tests/src/utils/test-scale.c+14−14
@@ -2,21 +2,21 @@ · 1 unmodified line
22
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;
5+int 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 }

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