+ return 1;
+}
+
+/* Open an instance of the alsa writer. */
+static int alsa_open(struct writer_node *wn)
+{
+ struct alsa_write_args_info *conf = wn->conf;
+ struct writer_node_group *wng = wn->wng;
+ struct private_alsa_write_data *pad = para_calloc(sizeof(*pad));
+
+ wn->private_data = pad;
+ if (!conf->samplerate_given && wng->samplerate)
+ pad->samplerate = *wng->samplerate;
+ else
+ pad->samplerate = conf->samplerate_arg;
+ if (!conf->channels_given && wng->channels)
+ pad->channels = *wng->channels;
+ else
+ pad->channels = conf->channels_arg;
+ PARA_INFO_LOG("%d channel(s), %dHz\n", pad->channels, pad->samplerate);
+ tv_add(now, &(struct timeval){0, 100 * 1000}, &pad->next_chunk);
+ return 1;