diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-31 18:51:33 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-31 18:51:33 +0000 |
commit | df1c4dddc39d1cc5132501afb94bbabb9935cc32 (patch) | |
tree | 41ea78314c31f174d0da099c36f76b4c553a2287 /gtk2_ardour/ardour_ui_ed.cc | |
parent | 1ab5012af74371379a5a35c3c43ecf05ed91645e (diff) |
remove ardour_message.{cc,h}; JACK latency menu now shows correct settings at startup and changes are handled correctly; export range markers doesn't start with /path/to/export.wav, just /path/to; hopefully improve ruler scrolling a little; fixed up short_path() implementation ; fix for export unsetting JACK freewheel too soon ; use ISO 8061 timestamps for snapshot default names
git-svn-id: svn://localhost/ardour2/trunk@1400 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui_ed.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 8dd4913f0e..6e5aa01ac6 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -35,6 +35,7 @@ #include "actions.h" #include <ardour/session.h> +#include <ardour/audioengine.h> #include <ardour/control_protocol_manager.h> #include <control_protocol/control_protocol.h> @@ -523,6 +524,57 @@ ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const cha } void +ARDOUR_UI::set_jack_buffer_size (nframes_t nframes) +{ + Glib::RefPtr<Action> action; + char* action_name = 0; + + switch (nframes) { + case 32: + action_name = X_("JACKLatency32"); + break; + case 64: + action_name = X_("JACKLatency64"); + break; + case 128: + action_name = X_("JACKLatency128"); + break; + case 512: + action_name = X_("JACKLatency512"); + break; + case 1024: + action_name = X_("JACKLatency1024"); + break; + case 2048: + action_name = X_("JACKLatency2048"); + break; + case 4096: + action_name = X_("JACKLatency4096"); + break; + case 8192: + action_name = X_("JACKLatency8192"); + break; + default: + /* XXX can we do anything useful ? */ + break; + } + + if (action_name) { + + action = ActionManager::get_action (X_("JACK"), action_name); + + if (action) { + Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (action); + + if (ract && ract->get_active()) { + engine->request_buffer_size (nframes); + update_sample_rate (0); + } + } + } +} + +void ARDOUR_UI::build_control_surface_menu () { list<ControlProtocolInfo*>::iterator i; |