NO-OP: whitespace
[ardour.git] / libs / ardour / session_time.cc
index 8f080285e2c26a09e893644bc2e5bbe8ce47c501..64641e302beb4d9c78a9d18811c5ba03ef5c3ace 100644 (file)
@@ -67,11 +67,11 @@ void
 Session::sync_time_vars ()
 {
        _current_frame_rate = (framecnt_t) round (_nominal_frame_rate * (1.0 + (config.get_video_pullup()/100.0)));
-       _frames_per_timecode_frame = (double) _current_frame_rate / (double) timecode_frames_per_second();
+       _samples_per_timecode_frame = (double) _current_frame_rate / (double) timecode_frames_per_second();
        if (timecode_drop_frames()) {
-         _frames_per_hour = (int32_t)(107892 * _frames_per_timecode_frame);
+         _frames_per_hour = (int32_t)(107892 * _samples_per_timecode_frame);
        } else {
-         _frames_per_hour = (int32_t)(3600 * rint(timecode_frames_per_second()) * _frames_per_timecode_frame);
+         _frames_per_hour = (int32_t)(3600 * rint(timecode_frames_per_second()) * _samples_per_timecode_frame);
        }
        _timecode_frames_per_hour = rint(timecode_frames_per_second() * 3600.0);
 
@@ -183,19 +183,26 @@ int
 Session::backend_sync_callback (TransportState state, framepos_t pos)
 {
        bool slave = synced_to_engine();
+       // cerr << "Session::backend_sync_callback() _transport_frame: " << _transport_frame << " pos: " << pos << " audible_frame: " << audible_frame() << endl;
+
+       if (slave) {
+               // cerr << "Session::backend_sync_callback() emitting Located()" << endl;
+               Located (); /* EMIT SIGNAL */
+       }
 
        switch (state) {
        case TransportStopped:
                if (slave && _transport_frame != pos && post_transport_work() == 0) {
                        request_locate (pos, false);
-                       // cerr << "SYNC: stopped, locate to " << pos->frame << " from " << _transport_frame << endl;
+                       // cerr << "SYNC: stopped, locate to " << pos << " from " << _transport_frame << endl;
                        return false;
                } else {
+                       // cerr << "SYNC: stopped, nothing to do" << endl;
                        return true;
                }
 
        case TransportStarting:
-               // cerr << "SYNC: starting @ " << pos->frame << " a@ " << _transport_frame << " our work = " <<  post_transport_work() << " pos matches ? " << (_transport_frame == pos->frame) << endl;
+               // cerr << "SYNC: starting @ " << pos << " a@ " << _transport_frame << " our work = " <<  post_transport_work() << " pos matches ? " << (_transport_frame == pos) << endl;
                if (slave) {
                        return _transport_frame == pos && post_transport_work() == 0;
                } else {