]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod.c
Speed up audiod_pre_select.
[paraslash.git] / audiod.c
index 701f827848b112b735e3fa16cae371934200e8a8..dee31d5c5606727d1f320e1ad16abb09a0c6b97b 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -599,6 +599,8 @@ static void audiod_pre_select(struct sched *s, __a_unused struct task *t)
                a = &afi[sl->format];
                if (!sl->receiver_node)
                        continue;
+               if ((!a->num_filters || sl->fc) && sl->wng)
+                       continue; /* everything already started */
                if (!a->num_filters) {
                        if (sl->receiver_node->loaded && !sl->wng) {
                                open_writers(i);
@@ -611,7 +613,7 @@ static void audiod_pre_select(struct sched *s, __a_unused struct task *t)
                        s->timeout = min_delay;
                        continue;
                }
-               if (!sl->fc || !*sl->fc->out_loaded || sl->wng)
+               if (sl->wng || !sl->fc || !*sl->fc->out_loaded)
                        continue;
                if (tv_diff(now, &initial_delay_barrier, &diff) > 0) {
                        open_writers(i);