+ switch (rb_current_opt) {
+ case 0:
+ transients = NoTransients; peaklock = false; longwin = true; shortwin = false;
+ break;
+ case 1:
+ transients = NoTransients; peaklock = false; longwin = false; shortwin = false;
+ break;
+ case 2:
+ transients = NoTransients; peaklock = true; longwin = false; shortwin = false;
+ break;
+ case 3:
+ transients = BandLimitedTransients; peaklock = true; longwin = false; shortwin = false;
+ break;
+ case 5:
+ transients = Transients; peaklock = false; longwin = false; shortwin = true;
+ break;
+ case 6:
+ transients = NoTransients;
+ precise = true;
+ preserve_formants = false;
+ current_timefx->request.pitch_fraction = 1/val;
+ shortwin = true;
+ // peaklock = false;
+ break;
+ default:
+ /* default/4 */
+ transients = Transients; peaklock = true; longwin = false; shortwin = false;
+ break;
+ };
+
+ if (realtime) options |= RubberBandStretcher::OptionProcessRealTime;
+ if (precise) options |= RubberBandStretcher::OptionStretchPrecise;
+ if (preserve_formants) options |= RubberBandStretcher::OptionFormantPreserved;
+ if (!peaklock) options |= RubberBandStretcher::OptionPhaseIndependent;
+ if (longwin) options |= RubberBandStretcher::OptionWindowLong;
+ if (shortwin) options |= RubberBandStretcher::OptionWindowShort;
+
+ switch (transients) {
+ case NoTransients:
+ options |= RubberBandStretcher::OptionTransientsSmooth;
+ break;
+ case BandLimitedTransients:
+ options |= RubberBandStretcher::OptionTransientsMixed;
+ break;
+ case Transients:
+ options |= RubberBandStretcher::OptionTransientsCrisp;
+ break;
+ }
+
+ current_timefx->request.opts = (int) options;
+#else
+ current_timefx->request.quick_seek = current_timefx->quick_button.get_active();
+ current_timefx->request.antialias = !current_timefx->antialias_button.get_active();
+#endif
+ current_timefx->request.progress = 0.0f;
+ current_timefx->request.done = false;
+ current_timefx->request.cancel = false;
+