1 #include <stdlib.h>
2 #include <stdio.h>
3 #include "soundpipe.h"
4 #include "config.h"
5 
main()6 int main() {
7     sp_data *sp;
8     sp_create(&sp);
9     sp_srand(sp, 12345);
10     sp->sr = SR;
11     sp->len = sp->sr * LEN;
12     uint32_t t, u;
13     SPFLOAT in = 0, out = 0;
14 
15     sp_port *unit[NUM];
16 
17     for(u = 0; u < NUM; u++) {
18         sp_port_create(&unit[u]);
19         sp_port_init(sp, unit[u], 0);
20     }
21 
22     for(t = 0; t < sp->len; t++) {
23         for(u = 0; u < NUM; u++) sp_port_compute(sp, unit[u], &in, &out);
24     }
25 
26     for(u = 0; u < NUM; u++) sp_port_destroy(&unit[u]);
27 
28     sp_destroy(&sp);
29     return 0;
30 }
31 
32