From 3503079eae02744f8e361a78fb1ef71a30d03b39 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 12 Oct 2015 00:29:45 +0200 Subject: reading of mixer commands works now --- apps/dolmetschctl.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'apps/dolmetschctl.c') 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; -- cgit v1.2.3