mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
More generic support for poll descriptors
This commit is contained in:
parent
a86efa083c
commit
460660d4b4
25 changed files with 162 additions and 68 deletions
|
|
@ -74,7 +74,7 @@ int snd_timer_close(snd_timer_t *handle)
|
|||
return res;
|
||||
}
|
||||
|
||||
int snd_timer_poll_descriptor(snd_timer_t *handle)
|
||||
int _snd_timer_poll_descriptor(snd_timer_t *handle)
|
||||
{
|
||||
snd_timer_t *tmr;
|
||||
|
||||
|
|
@ -84,6 +84,16 @@ int snd_timer_poll_descriptor(snd_timer_t *handle)
|
|||
return tmr->fd;
|
||||
}
|
||||
|
||||
int snd_timer_poll_descriptors(snd_timer_t *timer, struct pollfd *pfds, unsigned int space)
|
||||
{
|
||||
assert(timer);
|
||||
if (space >= 1) {
|
||||
pfds->fd = timer->fd;
|
||||
pfds->events = POLLIN;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int snd_timer_next_device(snd_timer_t *handle, snd_timer_id_t * tid)
|
||||
{
|
||||
snd_timer_t *tmr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue