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:
Jaroslav Kysela 2001-02-14 12:15:03 +00:00
parent c71b72ee27
commit cc956312b3
11 changed files with 82 additions and 7 deletions

View file

@ -58,14 +58,23 @@ int _snd_rawmidi_poll_descriptor(snd_rawmidi_t *rmidi)
return rmidi->poll_fd;
}
int snd_rawmidi_poll_descriptors_count(snd_rawmidi_t *rmidi, unsigned int *count)
{
assert(rmidi);
assert(count);
*count = 1;
return 0;
}
int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rmidi, struct pollfd *pfds, unsigned int space)
{
assert(rmidi);
if (space >= 1) {
pfds->fd = rmidi->poll_fd;
pfds->events = rmidi->stream == SND_RAWMIDI_STREAM_OUTPUT ? POLLOUT : POLLIN;
return 1;
}
return 1;
return 0;
}