diff options
author | Christian Pointner <equinox@spreadspace.org> | 2015-10-12 01:33:49 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2015-10-12 01:33:49 +0200 |
commit | 72aef56c3f9f3441d5cdabfed2b1eb1ba8743bbb (patch) | |
tree | 2dae4991f8a70636f0ab188fa92df2c6d097050b /apps/mixer.h | |
parent | refactored mixer variable name (diff) |
switch task insertion works now
Diffstat (limited to 'apps/mixer.h')
-rw-r--r-- | apps/mixer.h | 16 |
1 files changed, 10 insertions, 6 deletions
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); |