diff options
Diffstat (limited to 'audio/filter')
-rw-r--r-- | audio/filter/af_format.c | 12 | ||||
-rw-r--r-- | audio/filter/af_lavcac3enc.c | 12 | ||||
-rw-r--r-- | audio/filter/af_rubberband.c | 58 | ||||
-rw-r--r-- | audio/filter/af_scaletempo.c | 18 |
4 files changed, 50 insertions, 50 deletions
diff --git a/audio/filter/af_format.c b/audio/filter/af_format.c index 3e1eef664c..79d78d1d96 100644 --- a/audio/filter/af_format.c +++ b/audio/filter/af_format.c @@ -128,12 +128,12 @@ const struct mp_user_filter_entry af_format = { .description = "Force audio format", .priv_size = sizeof(struct f_opts), .options = (const struct m_option[]) { - OPT_AUDIOFORMAT("format", in_format, 0), - OPT_INTRANGE("srate", in_srate, 0, 1000, 8*48000), - OPT_CHANNELS("channels", in_channels, 0, .min = 1), - OPT_INTRANGE("out-srate", out_srate, 0, 1000, 8*48000), - OPT_CHANNELS("out-channels", out_channels, 0, .min = 1), - OPT_FLAG("fail", fail, 0), + {"format", OPT_AUDIOFORMAT(in_format)}, + {"srate", OPT_INT(in_srate), M_RANGE(1000, 8*48000)}, + {"channels", OPT_CHANNELS(in_channels), .min = 1}, + {"out-srate", OPT_INT(out_srate), M_RANGE(1000, 8*48000)}, + {"out-channels", OPT_CHANNELS(out_channels), .min = 1}, + {"fail", OPT_FLAG(fail)}, {0} }, }, diff --git a/audio/filter/af_lavcac3enc.c b/audio/filter/af_lavcac3enc.c index c7582cf52b..38f93a1c08 100644 --- a/audio/filter/af_lavcac3enc.c +++ b/audio/filter/af_lavcac3enc.c @@ -375,12 +375,12 @@ const struct mp_user_filter_entry af_lavcac3enc = { .encoder = "ac3", }, .options = (const struct m_option[]) { - OPT_FLAG("tospdif", add_iec61937_header, 0), - OPT_CHOICE_OR_INT("bitrate", bit_rate, 0, 32, 640, - ({"auto", 0}, {"default", 0})), - OPT_INTRANGE("minch", min_channel_num, 0, 2, 6), - OPT_STRING("encoder", encoder, 0), - OPT_KEYVALUELIST("o", avopts, 0), + {"tospdif", OPT_FLAG(add_iec61937_header)}, + {"bitrate", OPT_CHOICE(bit_rate, + {"auto", 0}, {"default", 0}), M_RANGE(32, 640)}, + {"minch", OPT_INT(min_channel_num), M_RANGE(2, 6)}, + {"encoder", OPT_STRING(encoder)}, + {"o", OPT_KEYVALUELIST(avopts)}, {0} }, }, diff --git a/audio/filter/af_rubberband.c b/audio/filter/af_rubberband.c index 4c2b69049d..4df2001c49 100644 --- a/audio/filter/af_rubberband.c +++ b/audio/filter/af_rubberband.c @@ -333,35 +333,35 @@ const struct mp_user_filter_entry af_rubberband = { .channels = RubberBandOptionChannelsTogether, }, .options = (const struct m_option[]) { - OPT_CHOICE("transients", transients, 0, - ({"crisp", RubberBandOptionTransientsCrisp}, - {"mixed", RubberBandOptionTransientsMixed}, - {"smooth", RubberBandOptionTransientsSmooth})), - OPT_CHOICE("detector", detector, 0, - ({"compound", RubberBandOptionDetectorCompound}, - {"percussive", RubberBandOptionDetectorPercussive}, - {"soft", RubberBandOptionDetectorSoft})), - OPT_CHOICE("phase", phase, 0, - ({"laminar", RubberBandOptionPhaseLaminar}, - {"independent", RubberBandOptionPhaseIndependent})), - OPT_CHOICE("window", window, 0, - ({"standard", RubberBandOptionWindowStandard}, - {"short", RubberBandOptionWindowShort}, - {"long", RubberBandOptionWindowLong})), - OPT_CHOICE("smoothing", smoothing, 0, - ({"off", RubberBandOptionSmoothingOff}, - {"on", RubberBandOptionSmoothingOn})), - OPT_CHOICE("formant", formant, 0, - ({"shifted", RubberBandOptionFormantShifted}, - {"preserved", RubberBandOptionFormantPreserved})), - OPT_CHOICE("pitch", pitch, 0, - ({"quality", RubberBandOptionPitchHighQuality}, - {"speed", RubberBandOptionPitchHighSpeed}, - {"consistency", RubberBandOptionPitchHighConsistency})), - OPT_CHOICE("channels", channels, 0, - ({"apart", RubberBandOptionChannelsApart}, - {"together", RubberBandOptionChannelsTogether})), - OPT_DOUBLE("pitch-scale", scale, 0, .min = 0.01, .max = 100), + {"transients", OPT_CHOICE(transients, + {"crisp", RubberBandOptionTransientsCrisp}, + {"mixed", RubberBandOptionTransientsMixed}, + {"smooth", RubberBandOptionTransientsSmooth})}, + {"detector", OPT_CHOICE(detector, + {"compound", RubberBandOptionDetectorCompound}, + {"percussive", RubberBandOptionDetectorPercussive}, + {"soft", RubberBandOptionDetectorSoft})}, + {"phase", OPT_CHOICE(phase, + {"laminar", RubberBandOptionPhaseLaminar}, + {"independent", RubberBandOptionPhaseIndependent})}, + {"window", OPT_CHOICE(window, + {"standard", RubberBandOptionWindowStandard}, + {"short", RubberBandOptionWindowShort}, + {"long", RubberBandOptionWindowLong})}, + {"smoothing", OPT_CHOICE(smoothing, + {"off", RubberBandOptionSmoothingOff}, + {"on", RubberBandOptionSmoothingOn})}, + {"formant", OPT_CHOICE(formant, + {"shifted", RubberBandOptionFormantShifted}, + {"preserved", RubberBandOptionFormantPreserved})}, + {"pitch", OPT_CHOICE(pitch, + {"quality", RubberBandOptionPitchHighQuality}, + {"speed", RubberBandOptionPitchHighSpeed}, + {"consistency", RubberBandOptionPitchHighConsistency})}, + {"channels", OPT_CHOICE(channels, + {"apart", RubberBandOptionChannelsApart}, + {"together", RubberBandOptionChannelsTogether})}, + {"pitch-scale", OPT_DOUBLE(scale), M_RANGE(0.01, 100)}, {0} }, }, diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c index b76abc8e78..911fd8914e 100644 --- a/audio/filter/af_scaletempo.c +++ b/audio/filter/af_scaletempo.c @@ -609,15 +609,15 @@ const struct mp_user_filter_entry af_scaletempo = { .scale_nominal = 1.0, }, .options = (const struct m_option[]) { - 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}, - {"none", 0}, - {"both", SCALE_TEMPO | SCALE_PITCH})), + {"scale", OPT_FLOAT(scale_nominal), M_RANGE(0.01, DBL_MAX)}, + {"stride", OPT_FLOAT(ms_stride), M_RANGE(0.01, DBL_MAX)}, + {"overlap", OPT_FLOAT(percent_overlap), M_RANGE(0, 1)}, + {"search", OPT_FLOAT(ms_search), M_RANGE(0, DBL_MAX)}, + {"speed", OPT_CHOICE(speed_opt, + {"pitch", SCALE_PITCH}, + {"tempo", SCALE_TEMPO}, + {"none", 0}, + {"both", SCALE_TEMPO | SCALE_PITCH})}, {0} }, }, |