diff options
Diffstat (limited to 'apps/dolmetschctl.c')
-rw-r--r-- | apps/dolmetschctl.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/dolmetschctl.c b/apps/dolmetschctl.c index 5365c22..2cffff7 100644 --- a/apps/dolmetschctl.c +++ b/apps/dolmetschctl.c @@ -62,13 +62,18 @@ int main_loop(mixer_t* x, midi_t* m, osc_t* o) int npfds = midi_npfds + osc_npfds + mixer_npfds; struct pollfd *pfds = alloca(npfds * sizeof(struct pollfd)); - + if(!pfds) { + error(0, 0, "error while allocating poll fds - stack corrupted??"); + return -1; + } mixer_get_poll_fds(x, &(pfds[mixer_npfds_offset]), mixer_npfds); midi_get_poll_fds(m, &(pfds[midi_npfds_offset]), midi_npfds); osc_get_poll_fds(o, &(pfds[osc_npfds_offset]), osc_npfds); - printf("main_loop running...\n"); + mixer_print_langs(x); + + printf("main_loop running with %d pollfds...\n", npfds); for (;;) { int err = poll(pfds, npfds, 200); if(err < 0 && errno != EINTR) { @@ -99,11 +104,11 @@ int main_loop(mixer_t* x, midi_t* m, osc_t* o) int main(int argc, char* argv[]) { mixer_t x; - if(mixer_init(&x, "qu24", "hw:1,0,0")) + if(mixer_init(&x, "qu24", "hw:2,0,0")) return -1; midi_t m; - if(midi_init(&m, "hw:1,0,0")) + if(midi_init(&m, "hw:3,0,0")) return -1; osc_t o; |