X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=d39f0f57620b80f8791bd7eeca015df2af566ea7;hp=778196542d63dc855a6c8ccd6228362b434b698f;hb=faeabd31b4bea5c097acff4738a0626e3c84f1d9;hpb=343f3c63fc3a7f9ca4ba4163c9e4cf06cde8d0c3 diff --git a/audiod.c b/audiod.c index 77819654..d39f0f57 100644 --- a/audiod.c +++ b/audiod.c @@ -49,8 +49,8 @@ struct audio_format_info { void **filter_conf; /** the number of filters that should be activated for this audio format */ unsigned int num_writers; - /** pointer to the array of writers to be activated */ - struct writer **writers; + /** Array of writer numbers to be activated. */ + int *writer_nums; /** pointer to the array of writer configurations */ void **writer_conf; /** do not start receiver/filters/writer before this time */ @@ -385,8 +385,8 @@ static void open_filters(int slot_num) s->fc->inbufp = &s->receiver_node->buf; s->fc->in_loaded = &s->receiver_node->loaded; s->fc->input_error = &s->receiver_node->task.error; - s->fc->task.pre_select = filter_pre_select; - s->fc->task.post_select = NULL; + s->fc->task.pre_select = NULL; + s->fc->task.post_select = filter_post_select; s->fc->task.error = 0; s->fc->num_filters = nf; @@ -434,13 +434,11 @@ static void open_writers(int slot_num) } for (i = 0; i < a->num_writers; i++) { s->wng->writer_nodes[i].conf = a->writer_conf[i]; - s->wng->writer_nodes[i].writer = a->writers[i]; + s->wng->writer_nodes[i].writer_num = a->writer_nums[i]; } ret = wng_open(s->wng); - if (ret < 0) { - PARA_ERROR_LOG("%s\n", para_strerror(-ret)); + if (ret < 0) return; - } s->wstime = *now; s->server_stream_start = stat_task->server_stream_start.tv_sec? stat_task->server_stream_start : *now; @@ -691,7 +689,7 @@ static int parse_writer_args(void) FOR_EACH_AUDIO_FORMAT(i) { a = &afi[i]; a->writer_conf = para_malloc(nw * sizeof(void *)); - a->writers = para_malloc(nw * sizeof(struct writer *)); + a->writer_nums = para_malloc(nw * sizeof(int)); a->num_writers = 0; } for (i = 0; i < conf.writer_given; i++) { @@ -707,7 +705,7 @@ static int parse_writer_args(void) ret = writer_num; goto out; } - a->writers[nw] = &writers[writer_num]; + a->writer_nums[nw] = writer_num; a->writer_conf[nw] = wconf; PARA_INFO_LOG("%s writer #%d: %s\n", audio_formats[ret], nw, writer_names[writer_num]);