]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Changed descriptors_count
authorAbramo Bagnara <abramo@alsa-project.org>
Sun, 18 Feb 2001 18:32:30 +0000 (18:32 +0000)
committerAbramo Bagnara <abramo@alsa-project.org>
Sun, 18 Feb 2001 18:32:30 +0000 (18:32 +0000)
12 files changed:
include/control.h
include/mixer.h
include/pcm.h
include/rawmidi.h
include/seq.h
include/timer.h
src/control/control.c
src/control/hcontrol.c
src/mixer/mixer.c
src/rawmidi/rawmidi.c
src/seq/seq.c
src/timer/timer.c

index 2ec4d07fbe2183c16fcc2c15e0b5232954c7de83..fb56a0648cfbf9361ffd3b749469a2b6fe96a36a 100644 (file)
@@ -160,7 +160,7 @@ int snd_ctl_open(snd_ctl_t **ctl, const char *name);
 int snd_ctl_close(snd_ctl_t *ctl);
 int snd_ctl_nonblock(snd_ctl_t *ctl, int nonblock);
 int snd_ctl_async(snd_ctl_t *ctl, int sig, pid_t pid);
-int snd_ctl_poll_descriptors_count(snd_ctl_t *ctl, unsigned int *count);
+int snd_ctl_poll_descriptors_count(snd_ctl_t *ctl);
 int snd_ctl_poll_descriptors(snd_ctl_t *ctl, struct pollfd *pfds, unsigned int space);
 int snd_ctl_subscribe_events(snd_ctl_t *ctl, int subscribe);
 int snd_ctl_card_info(snd_ctl_t *ctl, snd_ctl_card_info_t *info);
@@ -227,7 +227,7 @@ int snd_hctl_open(snd_hctl_t **hctl, const char *name);
 int snd_hctl_close(snd_hctl_t *hctl);
 int snd_hctl_nonblock(snd_hctl_t *hctl, int nonblock);
 int snd_hctl_async(snd_hctl_t *hctl, int sig, pid_t pid);
-int snd_hctl_poll_descriptors_count(snd_hctl_t *hctl, unsigned int *count);
+int snd_hctl_poll_descriptors_count(snd_hctl_t *hctl);
 int snd_hctl_poll_descriptors(snd_hctl_t *hctl, struct pollfd *pfds, unsigned int space);
 unsigned int snd_hctl_get_count(snd_hctl_t *hctl);
 int snd_hctl_set_compare(snd_hctl_t *hctl, snd_hctl_compare_t hsort);
index 5b223ed186c2610e1b45607516754b0c25bb6440..23e4d3b3300b955cd323dc3c2a46cd8bf3f2fb50 100644 (file)
@@ -44,7 +44,7 @@ snd_mixer_elem_t *snd_mixer_last_elem(snd_mixer_t *mixer);
 int snd_mixer_handle_events(snd_mixer_t *mixer);
 int snd_mixer_attach(snd_mixer_t *mixer, const char *name);
 int snd_mixer_detach(snd_mixer_t *mixer, const char *name);
-int snd_mixer_poll_descriptors_count(snd_mixer_t *mixer, unsigned int *count);
+int snd_mixer_poll_descriptors_count(snd_mixer_t *mixer);
 int snd_mixer_poll_descriptors(snd_mixer_t *mixer, struct pollfd *pfds, unsigned int space);
 int snd_mixer_load(snd_mixer_t *mixer);
 int snd_mixer_wait(snd_mixer_t *mixer, int timeout);
index 4eb6ef0bac49ef78aaf72cafdbf2e2dc4d542638..81a93453c49f925b9cab7dba8610bf2164ec7562 100644 (file)
@@ -216,7 +216,7 @@ int snd_pcm_open(snd_pcm_t **pcm, const char *name,
 
 snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm);
 int snd_pcm_close(snd_pcm_t *pcm);
-int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm, unsigned int *count);
+int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm);
 int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
 int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock);
 int snd_pcm_async(snd_pcm_t *pcm, int sig, pid_t pid);
index b46f7b5b3e992ff9b9eea827570462ad1636b349..535d3b0898a2b8906cb3028566f1bff69eaae388 100644 (file)
@@ -47,7 +47,7 @@ extern "C" {
 int snd_rawmidi_open(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
                     const char *name, int mode);
 int snd_rawmidi_close(snd_rawmidi_t *rmidi);
-int snd_rawmidi_poll_descriptors_count(snd_rawmidi_t *rmidi, unsigned int *count);
+int snd_rawmidi_poll_descriptors_count(snd_rawmidi_t *rmidi);
 int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rmidi, struct pollfd *pfds, unsigned int space);
 int snd_rawmidi_nonblock(snd_rawmidi_t *rmidi, int nonblock);
 int snd_rawmidi_info(snd_rawmidi_t *rmidi, snd_rawmidi_info_t * info);
index 16730eb8d54a1b1f98550a11b4573e3dece31962..f53b598247664fc895c693ec7c206b7a7f9f8308 100644 (file)
@@ -324,7 +324,7 @@ extern "C" {
 
 int snd_seq_open(snd_seq_t **handle, const char *name, int streams, int mode);
 int snd_seq_close(snd_seq_t *handle);
-int snd_seq_poll_descriptors_count(snd_seq_t *handle, unsigned int *count);
+int snd_seq_poll_descriptors_count(snd_seq_t *handle);
 int snd_seq_poll_descriptors(snd_seq_t *handle, struct pollfd *pfds, unsigned int space);
 int snd_seq_nonblock(snd_seq_t *handle, int nonblock);
 int snd_seq_client_id(snd_seq_t *handle);
index e72d19a06c9eea007f3ee5e058ff7e545fdf2126..2e0496fdf0cc429fd06728d9a660cca3ee99aa7a 100644 (file)
@@ -50,7 +50,7 @@ extern "C" {
 
 int snd_timer_open(snd_timer_t **handle);
 int snd_timer_close(snd_timer_t *handle);
-int snd_timer_poll_descriptors_count(snd_timer_t *handle, unsigned int *count);
+int snd_timer_poll_descriptors_count(snd_timer_t *handle);
 int snd_timer_poll_descriptors(snd_timer_t *handle, struct pollfd *pfds, unsigned int space);
 int snd_timer_next_device(snd_timer_t *handle, snd_timer_id_t *tid);
 int snd_timer_select(snd_timer_t *handle, snd_timer_select_t *tselect);
index d9d8d404835d056effab90c998bdf4711a279ae0..e99b17e75f370cf7efbf5b5d7cb37ac75c082508 100644 (file)
@@ -74,12 +74,10 @@ 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)
+int snd_ctl_poll_descriptors_count(snd_ctl_t *ctl)
 {
        assert(ctl);
-       assert(count);
-       *count = 1;
-       return 0;
+       return 1;
 }
 
 int snd_ctl_poll_descriptors(snd_ctl_t *ctl, struct pollfd *pfds, unsigned int space)
index 1b4612cc690f6da22f77a4a55593c9b1aa4bbac9..00e8ee4d9461b4afba3800d5c35b8048637bcff8 100644 (file)
@@ -83,11 +83,10 @@ int snd_hctl_async(snd_hctl_t *hctl, int sig, pid_t pid)
        return snd_ctl_async(hctl->ctl, sig, pid);
 }
 
-int snd_hctl_poll_descriptors_count(snd_hctl_t *hctl, unsigned int *count)
+int snd_hctl_poll_descriptors_count(snd_hctl_t *hctl)
 {
        assert(hctl);
-       assert(count);
-       return snd_ctl_poll_descriptors_count(hctl->ctl, count);
+       return snd_ctl_poll_descriptors_count(hctl->ctl);
 }
 
 int snd_hctl_poll_descriptors(snd_hctl_t *hctl, struct pollfd *pfds, unsigned int space)
index 936887b3a75adaa59d499e9e5abc298efc8b15fe..3cb88089fb38b7d3179ea6b00f644e2c07b4d4eb 100644 (file)
@@ -438,23 +438,21 @@ int snd_mixer_set_compare(snd_mixer_t *mixer, snd_mixer_compare_t msort)
        return 0;
 }
 
-int snd_mixer_poll_descriptors_count(snd_mixer_t *mixer, unsigned int *count)
+int snd_mixer_poll_descriptors_count(snd_mixer_t *mixer)
 {
        struct list_head *pos;
-       unsigned int c = 0, v;
+       unsigned int c = 0;
        assert(mixer);
-       assert(count);
        list_for_each(pos, &mixer->slaves) {
                snd_mixer_slave_t *s;
                int n;
                s = list_entry(pos, snd_mixer_slave_t, list);
-               n = snd_hctl_poll_descriptors_count(s->hctl, &v);
+               n = snd_hctl_poll_descriptors_count(s->hctl);
                if (n < 0)
                        return n;
-               c += v;
+               c += n;
        }
-       *count = c;
-       return 0;
+       return c;
 }
 
 int snd_mixer_poll_descriptors(snd_mixer_t *mixer, struct pollfd *pfds, unsigned int space)
index a5be7a7cc24d717ca33f433334e2b01f6c773182..7dd902e0625119aba758855d7ac22161276ef415 100644 (file)
@@ -58,12 +58,10 @@ 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)
+int snd_rawmidi_poll_descriptors_count(snd_rawmidi_t *rmidi)
 {
        assert(rmidi);
-       assert(count);
-       *count = 1;
-       return 0;
+       return 1;
 }
 
 int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rmidi, struct pollfd *pfds, unsigned int space)
index 3d3e5aa1567a23b07b4f435bc84bc5f407e64f11..94675e04e9c3518663998aafc967f9b5de3ee806 100644 (file)
@@ -152,12 +152,10 @@ int _snd_seq_poll_descriptor(snd_seq_t *seq)
        return seq->poll_fd;
 }
 
-int snd_seq_poll_descriptors_count(snd_seq_t *seq, unsigned int *count)
+int snd_seq_poll_descriptors_count(snd_seq_t *seq)
 {
        assert(seq);
-       assert(count);
-       *count = 1;
-       return 0;
+       return 1;
 }
 
 int snd_seq_poll_descriptors(snd_seq_t *seq, struct pollfd *pfds, unsigned int space)
index 38c1498a8f66e8a486712ded89d94993db903772..da5b680369742637811d138d6929545c2bc0792a 100644 (file)
@@ -84,12 +84,10 @@ int _snd_timer_poll_descriptor(snd_timer_t *handle)
        return tmr->fd;
 }
 
-int snd_timer_poll_descriptors_count(snd_timer_t *timer, unsigned int *count)
+int snd_timer_poll_descriptors_count(snd_timer_t *timer)
 {
        assert(timer);
-       assert(count);
-       *count = 1;
-       return 0;
+       return 1;
 }
 
 int snd_timer_poll_descriptors(snd_timer_t *timer, struct pollfd *pfds, unsigned int space)