-static void wng_event_handler(struct task *t)
-{
- struct writer_node_group *g = t->private_data;
-
- PARA_INFO_LOG("%s\n", PARA_STRERROR(-t->ret));
- unregister_task(t);
- wng_close(g);
-}
-
-
-static void idt_event_handler(struct task *t)
-{
- int ret;
-
- PARA_INFO_LOG("%s\n", PARA_STRERROR(-t->ret));
- unregister_task(t);
- wng->buf = sit.buf;
- wng->loaded = &sit.loaded;
- wng->input_eof = &sit.eof;
- wng->task.event_handler = wng_event_handler;
- wng->channels = &cwt.channels;
- wng->samplerate = &cwt.samplerate;
- ret = wng_open(wng);
- if (ret < 0) {
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
- exit(EXIT_FAILURE);
- }
-}
-
-static void cwt_event_handler(struct task *t)
-{
- if (t->ret != -E_NO_WAV_HEADER && t->ret != -E_WAV_HEADER_SUCCESS) {
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-t->ret));
- exit(EXIT_FAILURE);
- }
- PARA_INFO_LOG("%s\n", PARA_STRERROR(-t->ret));
- unregister_task(t);
-// if (t->ret == -E_WAV_HEADER_SUCCESS) {
-// conf.channels_arg = cwt.channels;
-// conf.sample_rate_arg = cwt.sample_rate;
-// }
- idt.task.pre_select = initial_delay_pre_select;
- idt.task.private_data = &idt;
- idt.task.event_handler = idt_event_handler;
- sprintf(idt.task.status, "initial_delay");
- register_task(&idt.task);
-}
-