diff options
Diffstat (limited to 'audio/filter/af_rubberband.c')
-rw-r--r-- | audio/filter/af_rubberband.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/audio/filter/af_rubberband.c b/audio/filter/af_rubberband.c index 4df2001c49..48e5cc1e86 100644 --- a/audio/filter/af_rubberband.c +++ b/audio/filter/af_rubberband.c @@ -20,6 +20,8 @@ #include <rubberband/rubberband-c.h> +#include "config.h" + #include "audio/aframe.h" #include "audio/format.h" #include "common/common.h" @@ -31,7 +33,7 @@ // command line options struct f_opts { int transients, detector, phase, window, - smoothing, formant, pitch, channels; + smoothing, formant, pitch, channels, engine; double scale; }; @@ -78,7 +80,10 @@ static bool init_rubberband(struct mp_filter *f) int opts = p->opts->transients | p->opts->detector | p->opts->phase | p->opts->window | p->opts->smoothing | p->opts->formant | - p->opts->pitch | p-> opts->channels | + p->opts->pitch | p->opts->channels | +#if HAVE_RUBBERBAND_3 + p->opts->engine | +#endif RubberBandOptionProcessRealTime; int rate = mp_aframe_get_rate(p->pending); @@ -331,6 +336,9 @@ const struct mp_user_filter_entry af_rubberband = { .transients = RubberBandOptionTransientsMixed, .formant = RubberBandOptionFormantPreserved, .channels = RubberBandOptionChannelsTogether, +#if HAVE_RUBBERBAND_3 + .engine = RubberBandOptionEngineFiner, +#endif }, .options = (const struct m_option[]) { {"transients", OPT_CHOICE(transients, @@ -361,6 +369,11 @@ const struct mp_user_filter_entry af_rubberband = { {"channels", OPT_CHOICE(channels, {"apart", RubberBandOptionChannelsApart}, {"together", RubberBandOptionChannelsTogether})}, +#if HAVE_RUBBERBAND_3 + {"engine", OPT_CHOICE(engine, + {"finer", RubberBandOptionEngineFiner}, + {"faster", RubberBandOptionEngineFaster})}, +#endif {"pitch-scale", OPT_DOUBLE(scale), M_RANGE(0.01, 100)}, {0} }, |