mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
More control/mixer API updates.
Added highlevel control layer. Recoded simple control mixer API.
This commit is contained in:
parent
72fa3cc203
commit
f5d6fdeba8
8 changed files with 797 additions and 277 deletions
|
|
@ -50,6 +50,43 @@ int snd_ctl_rawmidi_info(snd_ctl_t *handle, snd_rawmidi_info_t * info);
|
|||
|
||||
int snd_ctl_read(snd_ctl_t *handle, snd_ctl_callbacks_t * callbacks);
|
||||
|
||||
/*
|
||||
* Highlevel API for controls
|
||||
*/
|
||||
|
||||
typedef struct snd_hcontrol_stru snd_hcontrol_t;
|
||||
|
||||
struct snd_hcontrol_stru {
|
||||
snd_control_id_t id;
|
||||
int change: 1, /* structure change */
|
||||
value: 1; /* value change */
|
||||
/* event callbacks */
|
||||
void (*event_change)(snd_ctl_t *handle, snd_hcontrol_t *hcontrol);
|
||||
void (*event_value)(snd_ctl_t *handle, snd_hcontrol_t *hcontrol);
|
||||
void (*event_remove)(snd_ctl_t *handle, snd_hcontrol_t *hcontrol);
|
||||
/* private data */
|
||||
void *private_data;
|
||||
void (*private_free)(void *private_data);
|
||||
/* links */
|
||||
snd_hcontrol_t *prev;
|
||||
snd_hcontrol_t *next;
|
||||
};
|
||||
|
||||
typedef int (snd_ctl_csort_t)(const snd_hcontrol_t **c1, const snd_hcontrol_t **c2);
|
||||
typedef int (snd_ctl_ccallback_rebuild_t)(snd_ctl_t *handle, void *private_data);
|
||||
typedef int (snd_ctl_ccallback_add_t)(snd_ctl_t *handle, void *private_data, snd_hcontrol_t *hcontrol);
|
||||
|
||||
int snd_ctl_cbuild(snd_ctl_t *handle, snd_ctl_csort_t *csort);
|
||||
int snd_ctl_cfree(snd_ctl_t *handle);
|
||||
snd_hcontrol_t *snd_ctl_cfirst(snd_ctl_t *handle);
|
||||
snd_hcontrol_t *snd_ctl_clast(snd_ctl_t *handle);
|
||||
snd_hcontrol_t *snd_ctl_cfind(snd_ctl_t *handle, snd_control_id_t *id);
|
||||
int snd_ctl_csort(const snd_hcontrol_t **c1, const snd_hcontrol_t **c2);
|
||||
int snd_ctl_cresort(snd_ctl_t *handle, snd_ctl_csort_t *csort);
|
||||
int snd_ctl_ccallback_rebuild(snd_ctl_t *handle, snd_ctl_ccallback_rebuild_t *callback, void *private_data);
|
||||
int snd_ctl_ccallback_add(snd_ctl_t *handle, snd_ctl_ccallback_add_t *callback, void *private_data);
|
||||
int snd_ctl_cevent(snd_ctl_t *handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue