summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui_ed.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-06-01 22:26:12 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-06-01 22:26:12 +0000
commit7777d54887d95a38cd0222233ca06d8a146e5a76 (patch)
tree4b2cf6be0c108ca86d8bb0d88eef0529b998555f /gtk2_ardour/ardour_ui_ed.cc
parent2291d59bc813597c95f2f00b2e8ae697f1f284f9 (diff)
2nd stage of denormal handling (from trunk); fix to avoid FLAC support when using a too-new FLAC library
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@1940 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui_ed.cc')
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 37e23cdf6e..0e54e6253e 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -24,6 +24,7 @@
*/
#include <pbd/pathscanner.h>
+#include <pbd/fpu.h>
#include <glibmm/miscutils.h>
@@ -413,11 +414,23 @@ ARDOUR_UI::install_actions ()
RadioAction::Group denormal_group;
ActionManager::register_toggle_action (option_actions, X_("DenormalProtection"), _("Use DC bias"), mem_fun (*this, &ARDOUR_UI::toggle_denormal_protection));
+
+ FPU fpu;
ActionManager::register_radio_action (option_actions, denormal_group, X_("DenormalNone"), _("No processor handling"), bind (mem_fun (*this, &ARDOUR_UI::set_denormal_model), DenormalNone));
- ActionManager::register_radio_action (option_actions, denormal_group, X_("DenormalFTZ"), _("Use FlushToZero"), bind (mem_fun (*this, &ARDOUR_UI::set_denormal_model), DenormalFTZ));
- ActionManager::register_radio_action (option_actions, denormal_group, X_("DenormalDAZ"), _("Use DenormalsAreZero"), bind (mem_fun (*this, &ARDOUR_UI::set_denormal_model), DenormalDAZ));
- ActionManager::register_radio_action (option_actions, denormal_group, X_("DenormalFTZDAZ"), _("Use FlushToZero & DenormalsAreZero"), bind (mem_fun (*this, &ARDOUR_UI::set_denormal_model), DenormalFTZDAZ));
+
+ act = ActionManager::register_radio_action (option_actions, denormal_group, X_("DenormalFTZ"), _("Use FlushToZero"), bind (mem_fun (*this, &ARDOUR_UI::set_denormal_model), DenormalFTZ));
+ if (!fpu.has_flush_to_zero()) {
+ act->set_sensitive (false);
+ }
+ act = ActionManager::register_radio_action (option_actions, denormal_group, X_("DenormalDAZ"), _("Use DenormalsAreZero"), bind (mem_fun (*this, &ARDOUR_UI::set_denormal_model), DenormalDAZ));
+ if (!fpu.has_denormals_are_zero()) {
+ act->set_sensitive (false);
+ }
+ act = ActionManager::register_radio_action (option_actions, denormal_group, X_("DenormalFTZDAZ"), _("Use FlushToZero & DenormalsAreZero"), bind (mem_fun (*this, &ARDOUR_UI::set_denormal_model), DenormalFTZDAZ));
+ if (!fpu.has_flush_to_zero() || !fpu.has_denormals_are_zero()) {
+ act->set_sensitive (false);
+ }
act = ActionManager::register_toggle_action (option_actions, X_("DoNotRunPluginsWhileRecording"), _("Do not run plugins while recording"), mem_fun (*this, &ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording));
ActionManager::session_sensitive_actions.push_back (act);