make solo button2 click function as momentary even when in listen mode; tweak auditio...
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 25 Mar 2010 14:51:32 +0000 (14:51 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 25 Mar 2010 14:51:32 +0000 (14:51 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@6795 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/route_ui.cc
libs/ardour/ardour/auditioner.h
libs/ardour/auditioner.cc
libs/ardour/session_process.cc

index b0075a6a678c74f4082f067d2c6d140dcb78ee48..bdbdd11591563b860589b568e49c57447907138b 100644 (file)
@@ -466,7 +466,11 @@ RouteUI::solo_release (GdkEventButton*)
                        if (_solo_release->exclusive) {
 
                        } else {
-                               _session->set_solo (_solo_release->routes, _solo_release->active, Session::rt_cleanup, true);
+                                if (Config->get_solo_control_is_listen_control()) {
+                                        _session->set_listen (_solo_release->routes, _solo_release->active, Session::rt_cleanup, true);
+                                } else {
+                                        _session->set_solo (_solo_release->routes, _solo_release->active, Session::rt_cleanup, true);
+                                }
                        }
 
                        delete _solo_release;
index f779fa845711f0f0295b68fef77ee85065344882..e7d3347cb66b342e68478cf0f6dd5816f6fd7fd0 100644 (file)
@@ -53,6 +53,7 @@ class Auditioner : public AudioTrack
        }
 
        bool auditioning() const { return g_atomic_int_get (&_auditioning); }
+        bool needs_monitor() const { return via_monitor; }
 
   private:
        boost::shared_ptr<AudioRegion> the_region;
@@ -60,6 +61,7 @@ class Auditioner : public AudioTrack
        mutable gint _auditioning;
        Glib::Mutex lock;
        nframes_t length;
+        bool via_monitor;
 
        void drop_ports ();
        static void *_drop_ports (void *);
index f955c75ea4877c3afcef51708d58a232561ac513..d7df19a70445b6f6c9070d35786e965aa7937b16 100644 (file)
@@ -42,6 +42,10 @@ using namespace PBD;
 
 Auditioner::Auditioner (Session& s)
        : AudioTrack (s, "auditioner", Route::Hidden)
+        , current_frame (0)
+        , _auditioning (0)
+        , length (0)
+        , via_monitor (false)
 {
 }
 
@@ -58,6 +62,7 @@ Auditioner::init ()
        if (left == "default") {
                 if (_session.monitor_out()) {
                         left = _session.monitor_out()->input()->audio (0)->name();
+                        via_monitor = true;
                 } else {
                         left = _session.engine().get_nth_physical_output (DataType::AUDIO, 0);
                 }
@@ -66,6 +71,7 @@ Auditioner::init ()
        if (right == "default") {
                 if (_session.monitor_out()) {
                         right = _session.monitor_out()->input()->audio (1)->name();
+                        via_monitor = true;
                 } else {
                         right = _session.engine().get_nth_physical_output (DataType::AUDIO, 1);
                 }
@@ -91,9 +97,6 @@ Auditioner::init ()
 
        _output->changed.connect_same_thread (*this, boost::bind (&Auditioner::output_changed, this, _1, _2));
 
-       the_region.reset ((AudioRegion*) 0);
-       g_atomic_int_set (&_auditioning, 0);
-
         return 0;
 }
 
index 306df524a8c9113e9ff9d552ffdb7dbc26d72bf2..8f6d8123ae0aed68987b30ed0817e9a79f344479 100644 (file)
@@ -880,7 +880,7 @@ Session::process_audition (nframes_t nframes)
 
         /* if using a monitor section, run it because otherwise we don't hear anything */
 
-        if (_monitor_out) {
+        if (auditioner->needs_monitor()) {
                 _monitor_out->passthru (_transport_frame, _transport_frame + nframes, nframes, false);
         }