mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
temporal: remove dangerous muldiv methods and use explicit method name not cast (GUI edition)
This commit is contained in:
parent
5175260af4
commit
ffda4b867e
2 changed files with 4 additions and 4 deletions
|
|
@ -187,7 +187,7 @@ Editor::time_fx (RegionList& regions, Temporal::ratio_t ratio, bool pitching)
|
||||||
current_timefx->request.time_fraction = current_timefx->get_time_fraction ();
|
current_timefx->request.time_fraction = current_timefx->get_time_fraction ();
|
||||||
current_timefx->request.pitch_fraction = current_timefx->get_pitch_fraction ();
|
current_timefx->request.pitch_fraction = current_timefx->get_pitch_fraction ();
|
||||||
|
|
||||||
if (current_timefx->request.time_fraction == 1.0 &&
|
if (current_timefx->request.time_fraction.to_double() == 1.0 &&
|
||||||
current_timefx->request.pitch_fraction == 1.0) {
|
current_timefx->request.pitch_fraction == 1.0) {
|
||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
current_timefx->hide ();
|
current_timefx->hide ();
|
||||||
|
|
@ -269,7 +269,7 @@ Editor::time_fx (RegionList& regions, Temporal::ratio_t ratio, bool pitching)
|
||||||
transients = NoTransients;
|
transients = NoTransients;
|
||||||
precise = true;
|
precise = true;
|
||||||
preserve_formants = false;
|
preserve_formants = false;
|
||||||
current_timefx->request.pitch_fraction = 1.0 / current_timefx->request.time_fraction;
|
current_timefx->request.pitch_fraction = 1.0 / current_timefx->request.time_fraction.to_double();
|
||||||
shortwin = true;
|
shortwin = true;
|
||||||
// peaklock = false;
|
// peaklock = false;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch, timecnt_t const & oldlen, tim
|
||||||
table->attach (*clock_align, 1, 2, row, row+1, Gtk::AttachOptions (Gtk::EXPAND|Gtk::FILL), Gtk::FILL, 0, 0);
|
table->attach (*clock_align, 1, 2, row, row+1, Gtk::AttachOptions (Gtk::EXPAND|Gtk::FILL), Gtk::FILL, 0, 0);
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
const double fract = (double) (new_length / original_length);
|
const double fract = (new_length / original_length).to_double();
|
||||||
/* note the *100.0 to convert fract into a percentage */
|
/* note the *100.0 to convert fract into a percentage */
|
||||||
duration_adjustment.set_value (fract*100.0);
|
duration_adjustment.set_value (fract*100.0);
|
||||||
Gtk::SpinButton* spinner = manage (new Gtk::SpinButton (duration_adjustment, 1.0, 3));
|
Gtk::SpinButton* spinner = manage (new Gtk::SpinButton (duration_adjustment, 1.0, 3));
|
||||||
|
|
@ -313,5 +313,5 @@ TimeFXDialog::duration_clock_changed ()
|
||||||
|
|
||||||
PBD::Unwinder<bool> uw (ignore_adjustment_change, true);
|
PBD::Unwinder<bool> uw (ignore_adjustment_change, true);
|
||||||
|
|
||||||
duration_adjustment.set_value (100.0 * (double) (duration_clock->current_duration() / original_length));
|
duration_adjustment.set_value (100.0 * (duration_clock->current_duration() / original_length).to_double());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue