+ if (!pwd)
+ return;
+ wmadec_cleanup(pwd);
+ free(fn->private_data);
+ fn->private_data = NULL;
+}
+
+static int wmadec_execute(struct btr_node *btrn, const char *cmd, char **result)
+{
+ struct filter_node *fn = btr_context(btrn);
+ struct private_wmadec_data *pwd = fn->private_data;
+
+ return decoder_execute(cmd, pwd->ahi.sample_rate, pwd->ahi.channels,
+ result);
+}
+
+#define WMA_OUTPUT_BUFFER_SIZE (128 * 1024)
+
+static void wmadec_post_select(__a_unused struct sched *s, struct task *t)
+{
+ struct filter_node *fn = container_of(t, struct filter_node, task);
+ int ret, converted;
+ struct private_wmadec_data *pwd = fn->private_data;
+ struct btr_node *btrn = fn->btrn;
+ size_t len;
+ char *in;
+
+next_buffer:
+ converted = 0;
+ t->error = 0;
+ ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
+ if (ret < 0)
+ goto err;
+ if (ret == 0)
+ return;
+ btr_merge(btrn, fn->min_iqs);
+ len = btr_next_buffer(btrn, (char **)&in);
+ ret = -E_WMADEC_EOF;
+ if (len < fn->min_iqs)
+ goto err;