7 int main(int argc
, char **argv
)
9 struct graph _graph
, *graph
= &_graph
;
10 struct graphnode
*node
;
14 if (graph_create(graph
)){
15 fprintf(stderr
, "cannot create graph\n");
19 ///// create wave file source /////
21 ef1
= wavefile_source_create("/home/aoe/reflections.wav");
23 fprintf(stderr
, "cannot open wave file\n");
28 node
= graphnode_create();
30 fprintf(stderr
, "cannot create graph node\n");
31 ef1
->vtab
->destroy(ef1
);
37 graph_append_node(graph
, node
);
39 ///// create a distortion effect (turn volume down!) /////
41 ef1
= distortion_create();
43 fprintf(stderr
, "cannot create distortion effect\n");
48 node
= graphnode_create();
50 fprintf(stderr
, "cannot create graph node\n");
51 ef1
->vtab
->destroy(ef1
);
57 graph_append_node(graph
, node
);
59 ///// create a silly effect (turn volume down!) /////
61 ef1
= silly_effect_create();
63 fprintf(stderr
, "cannot create distortion effect\n");
68 node
= graphnode_create();
70 fprintf(stderr
, "cannot create graph node\n");
71 ef1
->vtab
->destroy(ef1
);
77 graph_append_node(graph
, node
);
79 ///// create the play sink /////
84 ef1
= play_sink_create(&af
);
86 fprintf(stderr
, "cannot open /dev/dsp\n");
91 node
= graphnode_create();
93 fprintf(stderr
, "cannot create graph node\n");
94 ef1
->vtab
->destroy(ef1
);
100 graph_append_node(graph
, node
);
105 if (graph_run(graph
, 4410)){