diff options
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); |