From 8d965a1bfb3782343a03cff44977f11bb920f0b1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 13 Mar 2020 16:49:39 +0100 Subject: options: change how option range min/max is handled Before this commit, option declarations used M_OPT_MIN/M_OPT_MAX (and some other identifiers based on these) to signal whether an option had min/max values. Remove these flags, and make it use a range implicitly on the condition if min. */ +#include #include #include #include @@ -608,10 +609,10 @@ const struct mp_user_filter_entry af_scaletempo = { .scale_nominal = 1.0, }, .options = (const struct m_option[]) { - OPT_FLOAT("scale", scale_nominal, M_OPT_MIN, .min = 0.01), - OPT_FLOAT("stride", ms_stride, M_OPT_MIN, .min = 0.01), - OPT_FLOAT("overlap", percent_overlap, M_OPT_RANGE, .min = 0, .max = 1), - OPT_FLOAT("search", ms_search, M_OPT_MIN, .min = 0), + OPT_FLOAT("scale", scale_nominal, 0, .min = 0.01, .max = DBL_MAX), + OPT_FLOAT("stride", ms_stride, 0, .min = 0.01, .max = DBL_MAX), + OPT_FLOAT("overlap", percent_overlap, 0, .min = 0, .max = 1), + OPT_FLOAT("search", ms_search, 0, .min = 0, .max = DBL_MAX), OPT_CHOICE("speed", speed_opt, 0, ({"pitch", SCALE_PITCH}, {"tempo", SCALE_TEMPO}, -- cgit v1.2.3