- added support for user control elements

This commit is contained in:
Jaroslav Kysela 2003-10-21 17:39:14 +00:00
parent 701d0614f1
commit 4a54759f1f
5 changed files with 83 additions and 3 deletions

View file

@ -252,6 +252,48 @@ int snd_ctl_elem_info(snd_ctl_t *ctl, snd_ctl_elem_info_t *info)
return ctl->ops->element_info(ctl, info);
}
/**
* \brief Create and add an user CTL element
* \param ctl CTL handle
* \param info CTL element info
* \return 0 on success otherwise a negative error code
*
* Note that the new element is locked!
*/
int snd_ctl_elem_add(snd_ctl_t *ctl, snd_ctl_elem_info_t *info)
{
assert(ctl && info && info->id.name[0]);
return ctl->ops->element_add(ctl, info);
}
/**
* \brief Replace an user CTL element
* \param ctl CTL handle
* \param info CTL element info
* \return 0 on success otherwise a negative error code
*
* Note that the new element is locked!
*/
int snd_ctl_elem_replace(snd_ctl_t *ctl, snd_ctl_elem_info_t *info)
{
assert(ctl && info && info->id.name[0]);
return ctl->ops->element_replace(ctl, info);
}
/**
* \brief Remove an user CTL element
* \param ctl CTL handle
* \param id CTL element identification
* \return 0 on success otherwise a negative error code
*
* Note that the new element is locked!
*/
int snd_ctl_elem_remove(snd_ctl_t *ctl, snd_ctl_elem_id_t *id)
{
assert(ctl && id && (id->name[0] || id->numid));
return ctl->ops->element_remove(ctl, id);
}
/**
* \brief Get CTL element value
* \param ctl CTL handle