]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - grab_client.c
Update documentation of activate_grab_client().
[paraslash.git] / grab_client.c
index a3db5c68895ebf03feecadfeda7c826511f76db3..13b066b170dd0fb0c87a8bee88a2045a030a3bec 100644 (file)
@@ -164,7 +164,7 @@ void activate_grab_client(struct grab_client *gc, struct filter_node *fn)
  *
  * \param slot_num Audiod's slot for the new audio file.
  * \param audio_format_num The number of the audio format of the new audio file.
  *
  * \param slot_num Audiod's slot for the new audio file.
  * \param audio_format_num The number of the audio format of the new audio file.
- * \param filter_list The list of activated filters for that new audio file.
+ * \param fc The filter chain containing the activated filters.
  *
  * This is called from audiod.c when the current audio file changes. It loops
  * over all inactive grab clients and checks each grab client's configuration
  *
  * This is called from audiod.c when the current audio file changes. It loops
  * over all inactive grab clients and checks each grab client's configuration
@@ -176,7 +176,7 @@ void activate_grab_client(struct grab_client *gc, struct filter_node *fn)
  * activate_grab_client.
  */
 void activate_inactive_grab_clients(int slot_num, int audio_format_num,
  * activate_grab_client.
  */
 void activate_inactive_grab_clients(int slot_num, int audio_format_num,
-               struct list_head *filter_list)
+               struct filter_chain *fc)
 {
        struct grab_client *gc, *tmp;
        int i;
 {
        struct grab_client *gc, *tmp;
        int i;
@@ -193,12 +193,10 @@ void activate_inactive_grab_clients(int slot_num, int audio_format_num,
                                num_filters(gc->audio_format_num)
                                < gc->conf->filter_num_arg)
                        continue;
                                num_filters(gc->audio_format_num)
                                < gc->conf->filter_num_arg)
                        continue;
-               i = 1;
-               list_for_each_entry(fn, filter_list, node) {
+               FOR_EACH_FILTER_NODE(fn, fc, i) {
                        if (gc->conf->filter_num_arg <= 0
                        if (gc->conf->filter_num_arg <= 0
-                               || i == gc->conf->filter_num_arg)
+                               || i == gc->conf->filter_num_arg + 1)
                                break;
                                break;
-                       i++;
                }
                activate_grab_client(gc, fn);
        }
                }
                activate_grab_client(gc, fn);
        }