mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Changed behaviour of poll_descriptors function (returns the filled count of fds).
Added poll_descriptors_count functions. Added snd_mixer_elem_count function.
This commit is contained in:
parent
c71b72ee27
commit
cc956312b3
11 changed files with 82 additions and 7 deletions
|
|
@ -74,14 +74,23 @@ int _snd_ctl_poll_descriptor(snd_ctl_t *ctl)
|
|||
return ctl->ops->poll_descriptor(ctl);
|
||||
}
|
||||
|
||||
int snd_ctl_poll_descriptors_count(snd_ctl_t *ctl, unsigned int *count)
|
||||
{
|
||||
assert(ctl);
|
||||
assert(count);
|
||||
*count = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_ctl_poll_descriptors(snd_ctl_t *ctl, struct pollfd *pfds, unsigned int space)
|
||||
{
|
||||
assert(ctl);
|
||||
if (space >= 1) {
|
||||
if (space > 0) {
|
||||
pfds->fd = ctl->ops->poll_descriptor(ctl);
|
||||
pfds->events = POLLIN;
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_ctl_subscribe_events(snd_ctl_t *ctl, int subscribe)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue