diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-05-31 21:44:18 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-05-31 21:44:18 +0000 |
commit | 2291d59bc813597c95f2f00b2e8ae697f1f284f9 (patch) | |
tree | 6699041315f4bfa0cb605156fde098c143ad646a /gtk2_ardour/ardour_ui_options.cc | |
parent | c967b91ddf1bcd03ef44d62022b95257cbd94f60 (diff) |
add new denormal handling capabilities (95% finished)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@1935 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui_options.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_options.cc | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 34431aeafb..b59fdf803b 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -76,6 +76,12 @@ ARDOUR_UI::toggle_send_midi_feedback () } void +ARDOUR_UI::toggle_denormal_protection () +{ + ActionManager::toggle_config_state ("options", "DenormalProtection", &Configuration::set_denormal_protection, &Configuration::get_denormal_protection); +} + +void ARDOUR_UI::set_native_file_header_format (HeaderFormat hf) { const char *action = 0; @@ -293,6 +299,45 @@ ARDOUR_UI::set_monitor_model (MonitorModel model) } void +ARDOUR_UI::set_denormal_model (DenormalModel model) +{ + const char* action = 0; + + switch (model) { + case DenormalNone: + action = X_("DenormalNone"); + break; + + case DenormalFTZ: + action = X_("DenormalFTZ"); + break; + + case DenormalDAZ: + action = X_("DenormalDAZ"); + break; + + case DenormalFTZDAZ: + action = X_("DenormalFTZDAZ"); + break; + + default: + fatal << string_compose (_("programming error: unknown denormal model in ARDOUR_UI::set_denormal_model: %1"), model) << endmsg; + /*NOTREACHED*/ + } + + Glib::RefPtr<Action> act = ActionManager::get_action ("options", action); + + if (act) { + Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act); + + if (ract && ract->get_active() && Config->get_denormal_model() != model) { + Config->set_denormal_model (model); + } + } + +} + +void ARDOUR_UI::toggle_auto_input () { ActionManager::toggle_config_state ("Transport", "ToggleAutoInput", &Configuration::set_auto_input, &Configuration::get_auto_input); @@ -517,6 +562,36 @@ ARDOUR_UI::map_monitor_model () } void +ARDOUR_UI::map_denormal_model () +{ + const char* on = 0; + + switch (Config->get_denormal_model()) { + case DenormalNone: + on = X_("DenormalNone"); + break; + case DenormalFTZ: + on = X_("DenormalFTZ"); + break; + case DenormalDAZ: + on = X_("DenormalDAZ"); + break; + case DenormalFTZDAZ: + on = X_("DenormalFTZDAZ"); + break; + } + + Glib::RefPtr<Action> act = ActionManager::get_action ("options", on); + if (act) { + Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); + + if (tact && !tact->get_active()) { + tact->set_active (true); + } + } +} + +void ARDOUR_UI::map_remote_model () { const char* on = 0; @@ -905,6 +980,8 @@ ARDOUR_UI::parameter_changed (const char* parameter_name) ActionManager::map_some_state ("options", "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end); } else if (PARAM_IS ("monitoring-model")) { map_monitor_model (); + } else if (PARAM_IS ("denormal-model")) { + map_denormal_model (); } else if (PARAM_IS ("remote-model")) { map_remote_model (); } else if (PARAM_IS ("use-video-sync")) { |