static int vu_decode_update(struct aufilt_dec_st **stp, void **ctx, const struct aufilt *af, struct aufilt_prm *prm) { struct vumeter_dec *st; (void)ctx; (void)prm; if (!stp || !af) return EINVAL; if (*stp) return 0; st = mem_zalloc(sizeof(*st), vu_dec_destructor); if (!st) return ENOMEM; gdk_threads_enter(); call_window_got_vu_dec(st); gdk_threads_leave(); *stp = (struct aufilt_dec_st *)st; return 0; }
static int vu_decode_update(struct aufilt_dec_st **stp, void **ctx, const struct aufilt *af, struct aufilt_prm *prm, const struct audio *au) { struct vumeter_dec *st; (void)ctx; (void)prm; (void)au; if (!stp || !af) return EINVAL; if (*stp) return 0; if (prm->fmt != AUFMT_S16LE) { warning("vumeter: unsupported sample format (%s)\n", aufmt_name(prm->fmt)); return ENOTSUP; } st = mem_zalloc(sizeof(*st), vu_dec_destructor); if (!st) return ENOMEM; gdk_threads_enter(); call_window_got_vu_dec(st); gdk_threads_leave(); *stp = (struct aufilt_dec_st *)st; return 0; }