13
0

provide control over waveform image cache size from GUI

This commit is contained in:
Paul Davis 2015-06-23 08:18:11 -04:00
parent 424f6539b4
commit 9b75cdb26d
3 changed files with 20 additions and 0 deletions

View File

@ -425,6 +425,9 @@ ARDOUR_UI::parameter_changed (std::string p)
ArdourCanvas::WaveView::set_global_show_waveform_clipping (ARDOUR_UI::config()->get_show_waveform_clipping());
} else if (p == "font-scale") {
ui_scale = config()->get_font_scale () / 102400.;
} else if (p == "waveform-cache-size") {
/* GUI option has units of megabytes; image cache uses units of bytes */
ArdourCanvas::WaveView::set_image_cache_size (ARDOUR_UI::config()->get_waveform_cache_size() * 1048576);
}
}

View File

@ -2697,6 +2697,22 @@ RCOptionEditor::RCOptionEditor ()
sigc::mem_fun (*_ui_config, &UIConfiguration::set_super_rapid_clock_update)
));
/* Image cache size */
Gtk::Adjustment *ics = manage (new Gtk::Adjustment(0, 1, 1024, 10)); /* 1 MB to 1GB in steps of 10MB */
HSliderOption *sics = new HSliderOption("waveform-cache-size",
_("Waveform image cache size (megabytes)"),
ics,
sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::get_waveform_cache_size),
sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::set_waveform_cache_size)
);
sics->scale().set_digits (0);
Gtkmm2ext::UI::instance()->set_tip
(sics->tip_widget(),
_("Larger values lead to using more memory to store images of waveforms, which can improve graphical performance."));
add_option (S_("Preferences|GUI"), sics);
/* Lock GUI timeout */
Gtk::Adjustment *lts = manage (new Gtk::Adjustment(0, 0, 1000, 1, 10));

View File

@ -72,3 +72,4 @@ UI_CONFIG_VARIABLE (double, waveform_clip_level, "waveform-clip-level", -0.09339
UI_CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
UI_CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false)
UI_CONFIG_VARIABLE (bool, buggy_gradients, "buggy-gradients", false)
UI_CONFIG_VARIABLE (uint64_t, waveform_cache_size, "waveform-cache-size", 100) /* units of megagbytes */