fixes for various consistency/settings issues in monitor section; minor edit to PACKA...
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 17 Mar 2010 16:01:58 +0000 (16:01 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 17 Mar 2010 16:01:58 +0000 (16:01 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@6771 d708f5d6-7413-0410-9779-e7cbd77b26cf

PACKAGER_README
gtk2_ardour/monitor_section.cc
libs/ardour/ardour/debug.h
libs/ardour/debug.cc
libs/ardour/monitor_processor.cc

index 3b797d3c58f312dd9f123c1b95f67e153481f95c..a6c018800aeb2b8950e63c1100c9be7a3dc8fcb1 100644 (file)
@@ -1,6 +1,6 @@
 (1) VST SUPPORT
 
-Please do not distribution Ardour with VST support under the package
+Please do not distribute Ardour with VST support under the package
 name "ardour" (or any case-variant on that). Use some other name such
 as "ardourvst", "ArdourVST", "ardour-vst" etc. In the near future,
 work will be done to make it possible to share as much as possible of
@@ -9,4 +9,4 @@ the packaging.
 (2) STANDARD TEMPLATES
 
 The templates in ./templates are intended for installation in
-$prefix/share/ardour2/templates.
+$prefix/share/ardour3/templates.
index ca40dc614ac70d7d0de6540fd420c7f17b545a28..8909a1649c95e24fd5c85c8f399510e4b3446819 100644 (file)
@@ -692,35 +692,32 @@ MonitorSection::map_state ()
                 }
         }
 
-        act = ActionManager::get_action (X_("Monitor"), "monitor-solo");
-        if (act) {
-                Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
-                if (ract) {
-                        ract->set_active (_monitor->mono());
-                }
-        }
-
         act = ActionManager::get_action (X_("Monitor"), "monitor-cut-all");
         if (act) {
-                Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
-                if (ract) {
-                        ract->set_active (_monitor->cut_all());
+                Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+                if (tact) {
+                        cerr << "Set monitor cut all action to " << _monitor->cut_all () << endl;
+                        tact->set_active (_monitor->cut_all());
+                } else {
+                        cerr << " no global cut action\n";
                 }
+        } else {
+                cerr << " no global cut action2\n";
         }
 
         act = ActionManager::get_action (X_("Monitor"), "monitor-dim-all");
         if (act) {
-                Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
-                if (ract) {
-                        ract->set_active (_monitor->dim_all());
+                Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+                if (tact) {
+                        tact->set_active (_monitor->dim_all());
                 }
         }
-
+        
         act = ActionManager::get_action (X_("Monitor"), "monitor-mono");
         if (act) {
-                Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
-                if (ract) {
-                        ract->set_active (_monitor->mono());
+                Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+                if (tact) {
+                        tact->set_active (_monitor->mono());
                 }
         }
 
@@ -729,11 +726,44 @@ MonitorSection::map_state ()
         assert (nchans == _channel_buttons.size ());
 
         for (uint32_t n = 0; n < nchans; ++n) {
-                ChannelButtonSet* cbs = _channel_buttons[n];
-                cbs->cut.set_active (_monitor->cut (n));
-                cbs->dim.set_active (_monitor->dimmed (n));
-                cbs->solo.set_active (_monitor->soloed (n));
-                cbs->invert.set_active (_monitor->inverted (n));
+
+                char action_name[32];
+
+                snprintf (action_name, sizeof (action_name), "monitor-cut-%u", n+1);
+                act = ActionManager::get_action (X_("Monitor"), action_name);
+                if (act) {
+                        Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+                        if (tact) {
+                                tact->set_active (_monitor->cut (n));
+                        }
+                }
+
+                snprintf (action_name, sizeof (action_name), "monitor-dim-%u", n+1);
+                act = ActionManager::get_action (X_("Monitor"), action_name);
+                if (act) {
+                        Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+                        if (tact) {
+                                tact->set_active (_monitor->dimmed (n));
+                        }
+                }
+
+                snprintf (action_name, sizeof (action_name), "monitor-solo-%u", n+1);
+                act = ActionManager::get_action (X_("Monitor"), action_name);
+                if (act) {
+                        Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+                        if (tact) {
+                                tact->set_active (_monitor->soloed (n));
+                        }
+                }
+
+                snprintf (action_name, sizeof (action_name), "monitor-invert-%u", n+1);
+                act = ActionManager::get_action (X_("Monitor"), action_name);
+                if (act) {
+                        Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+                        if (tact) {
+                                tact->set_active (_monitor->inverted (n));
+                        }
+                }
         }
 }
 
index 5b4405b7d8145f8fff5a8a056738d54b6e3e7205..e2f3ff2c4944e25af481dd0bd6653b4e82e5a274 100644 (file)
@@ -44,6 +44,7 @@ namespace PBD {
                 extern uint64_t MidiIO;
                 extern uint64_t MackieControl;
                 extern uint64_t MidiClock;
+                extern uint64_t Monitor;
        }
 }
 
index d16985069402cae232fd0a44e307d645ab32029e..b329350006c9961e978a8f952591225b00c2dc00 100644 (file)
@@ -41,4 +41,5 @@ uint64_t PBD::DEBUG::SessionEvents = PBD::new_debug_bit ("sessionevents");
 uint64_t PBD::DEBUG::MidiIO = PBD::new_debug_bit ("midiio");
 uint64_t PBD::DEBUG::MackieControl = PBD::new_debug_bit ("mackiecontrol");
 uint64_t PBD::DEBUG::MidiClock = PBD::new_debug_bit ("midiclock");
+uint64_t PBD::DEBUG::Monitor = PBD::new_debug_bit ("monitor");
 
index f7dbd7bfdb3d851aaf1111deee4cf4dabfff0573..aa1609a8445ff7f2ffccad74c724d757a2568a1d 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "ardour/amp.h"
 #include "ardour/dB.h"
+#include "ardour/debug.h"
 #include "ardour/audio_buffer.h"
 #include "ardour/monitor_processor.h"
 #include "ardour/session.h"
@@ -243,6 +244,20 @@ MonitorProcessor::run (BufferSet& bufs, sframes_t /*start_frame*/, sframes_t /*e
                         }
                 }
 
+                DEBUG_TRACE (DEBUG::Monitor, 
+                             string_compose("channel %1 sb %2 gc %3 gd %4 cd %5 dl %6 cp %7 cc %8 cs %9 sc %10 TG %11\n", 
+                                            chn, 
+                                            solo_boost,
+                                            global_cut,
+                                            global_dim,
+                                            _channels[chn].dim,
+                                            dim_level,
+                                            _channels[chn].polarity,
+                                            _channels[chn].cut,
+                                            _channels[chn].soloed,
+                                            solo_cnt,
+                                            target_gain));
+                
                 if (target_gain != _channels[chn].current_gain || target_gain != 1.0f) {
 
                         Amp::apply_gain (*b, nframes, _channels[chn].current_gain, target_gain);
@@ -331,13 +346,15 @@ MonitorProcessor::set_cut (uint32_t chn, bool yn)
 void
 MonitorProcessor::set_solo (uint32_t chn, bool solo)
 {
-        _channels[chn].soloed = solo;
-
-        if (solo) {
-                solo_cnt++;
-        } else {
-                if (solo_cnt > 0) {
-                        solo_cnt--;
+        if (solo != _channels[chn].soloed) {
+                _channels[chn].soloed = solo;
+                
+                if (solo) {
+                        solo_cnt++;
+                } else {
+                        if (solo_cnt > 0) {
+                                solo_cnt--;
+                        }
                 }
         }
 }