12 static void signal_callback(struct mainloop_source *m, int sig, void *userdata) {
13 mainloop_quit(mainloop_source_get_mainloop(m), -1);
14 fprintf(stderr, "main: got signal.\n");
17 int main(int argc, char *argv[]) {
30 mainloop_source_new_signal(m, SIGINT, signal_callback, NULL);
31 signal(SIGPIPE, SIG_IGN);
33 module_load(c, "module-oss-mmap", "/dev/dsp1");
34 module_load(c, "module-pipe-sink", NULL);
35 module_load(c, "module-simple-protocol-tcp", NULL);
37 fprintf(stderr, "main: mainloop entry.\n");
38 while (mainloop_iterate(m, 1) == 0);
39 /* fprintf(stderr, "main: %u blocks\n", n_blocks);*/
40 fprintf(stderr, "main: mainloop exit.\n");