From 72aef56c3f9f3441d5cdabfed2b1eb1ba8743bbb Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 12 Oct 2015 01:33:49 +0200 Subject: switch task insertion works now --- apps/mixer.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'apps/mixer.h') diff --git a/apps/mixer.h b/apps/mixer.h index f041da5..17b3282 100644 --- a/apps/mixer.h +++ b/apps/mixer.h @@ -35,21 +35,25 @@ typedef struct { slist_t cmds_; } lang_t; -// typedef struct { -// u_int8_t* buf_; -// (*done_cb)(void*); -// void* done_data; -// } task_t; +typedef struct { + u_int8_t* buf_; + int len_; + int write_idx_; + void (*done_cb)(void*); + void* done_data; +} task_t; typedef struct { const char* name_; snd_rawmidi_t* output_; slist_t langs_; -// slist_t tasks_; + slist_t tasks_; } mixer_t; int mixer_init(mixer_t* x, const char* name, const char* device); void mixer_print_langs(mixer_t* x); +int mixer_switch_lang(mixer_t* x, const char* lang, void (*done_cb)(void*), void* done_data); +void mixer_print_tasks(mixer_t* x); int mixer_get_poll_fd_count(mixer_t* x); int mixer_get_poll_fds(mixer_t* x, struct pollfd *pfds, int npfds); int mixer_handle_revents(mixer_t* x, struct pollfd *pfds, int npfds); -- cgit v1.2.3