diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index ee80019997..24bf02edde 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -234,6 +234,9 @@ static const gchar *_rb_opt_strings[] = { N_("Crisp monophonic instrumental"), N_("Unpitched solo percussion"), N_("Resample without preserving pitch"), +#ifdef HAVE_SOUNDTOUCH + N_("Vocal"), +#endif 0 }; #endif diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc index 2a89863197..2841bb7a3f 100644 --- a/gtk2_ardour/editor_timefx.cc +++ b/gtk2_ardour/editor_timefx.cc @@ -218,7 +218,7 @@ Editor::time_fx (RegionList& regions, float val, bool pitching) txt = current_timefx->stretch_opts_selector.get_active_text (); - for (int i = 0; i <= 6; i++) { + for (size_t i = 0; i < rb_opt_strings.size(); i++) { if (txt == rb_opt_strings[i]) { rb_current_opt = i; break; @@ -273,6 +273,11 @@ Editor::time_fx (RegionList& regions, float val, bool pitching) shortwin = true; // peaklock = false; break; + #ifdef HAVE_SOUNDTOUCH + case 7: + current_timefx->request.use_soundtouch = true; + break; + #endif default: /* default/4 */ transients = Transients; peaklock = true; longwin = false; shortwin = false; @@ -379,7 +384,15 @@ Editor::do_timefx () fx = new Pitch (*_session, current_timefx->request); } else { #ifdef USE_RUBBERBAND + #ifdef HAVE_SOUNDTOUCH + if (current_timefx->request.use_soundtouch) { + fx = new STStretch (*_session, current_timefx->request); + } else { + fx = new RBStretch (*_session, current_timefx->request); + } + #else fx = new RBStretch (*_session, current_timefx->request); + #endif #else fx = new STStretch (*_session, current_timefx->request); #endif