remove PBD::Connection (replace use with PBD::ScopedConnection); remove limitation...
[ardour.git] / libs / ardour / session_transport.cc
index 36e910374b067c0b48b1cfafadb63105c5394c44..a7f347da5c2cc65b135431a1471908857f4e59c5 100644 (file)
@@ -21,8 +21,6 @@
 #include <cerrno>
 #include <unistd.h>
 
-#include <sigc++/bind.h>
-#include <sigc++/retype.h>
 
 #include "pbd/undo.h"
 #include "pbd/error.h"
@@ -47,7 +45,6 @@
 
 using namespace std;
 using namespace ARDOUR;
-using namespace sigc;
 using namespace PBD;
 
 void
@@ -576,7 +573,9 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
                play_loop = false;
        }
 
-        PositionChanged ((nframes64_t) _transport_frame); /* EMIT SIGNAL */
+       // can't cast away volatile so copy and emit that
+       nframes64_t tframe = _transport_frame;
+       PositionChanged (tframe); /* EMIT SIGNAL */
        TransportStateChange (); /* EMIT SIGNAL */
 
        /* and start it up again if relevant */
@@ -641,8 +640,8 @@ Session::set_play_loop (bool yn)
        set_dirty();
        
        if (yn && Config->get_seamless_loop() && synced_to_jack()) {
-               warning << _("Seamless looping cannot be supported while Ardour is using JACK transport.\n"
-                            "Recommend changing the configured options")
+               warning << string_compose (_("Seamless looping cannot be supported while %1 is using JACK transport.\n"
+                                             "Recommend changing the configured options"), PROGRAM_NAME)
                        << endmsg;
                return;
        }
@@ -934,10 +933,6 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
 
                /* we are stopped and we want to start rolling at speed 1 */
 
-               if (!get_record_enabled() && Config->get_stop_at_session_end() && _transport_frame >= current_end_frame()) {
-                       return;
-               }
-
                if (Config->get_monitoring_model() == HardwareMonitoring) {
 
                        boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
@@ -958,14 +953,9 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
 
        } else {
 
-               /* if not recording, don't roll forward past end if told to stop there */
-
-               if (!get_record_enabled() && (speed > 0.0 && Config->get_stop_at_session_end() && _transport_frame >= current_end_frame())) {
-                       return;
-               }
-
                if ((synced_to_jack()) && speed != 0.0 && speed != 1.0) {
-                       warning << _("Global varispeed cannot be supported while Ardour is connected to JACK transport control")
+                       warning << string_compose (_("Global varispeed cannot be supported while %1 is connected to JACK transport control"),
+                                                   PROGRAM_NAME)
                                << endmsg;
                        return;
                }
@@ -1106,7 +1096,7 @@ Session::post_transport ()
        PostTransportWork ptw = post_transport_work ();
 
        if (ptw & PostTransportAudition) {
-               if (auditioner && auditioner->active()) {
+               if (auditioner && auditioner->auditioning()) {
                        process_function = &Session::process_audition;
                } else {
                        process_function = &Session::process_with_events;
@@ -1402,7 +1392,9 @@ Session::engine_halted ()
 void
 Session::xrun_recovery ()
 {
-       Xrun ((nframes64_t)_transport_frame); //EMIT SIGNAL
+       // can't cast away volatile so copy and emit that
+       nframes64_t tframe = _transport_frame;
+       Xrun (tframe); //EMIT SIGNAL
 
        if (Config->get_stop_recording_on_xrun() && actively_recording()) {