microseconds_t begin = get_microseconds ();
+ framepos_t tf;
{
boost::shared_ptr<RouteList> rl = routes.reader();
restart:
- const framepos_t tf = _transport_frame;
+ gint sc = g_atomic_int_get (&_seek_counter);
+ tf = _transport_frame;
- cerr << "\n\n >>> START Non-RT locate on routes to " << tf << "\n\n";
+ cerr << "\n\n >>> START Non-RT locate on routes to " << tf << " counter = " << sc << "\n\n";
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
- (*i)->non_realtime_locate (_transport_frame);
- if (tf != _transport_frame) {
- /* new locate request arrived while processing
- this one. start over.
- */
- cerr << "\n\n\n\n RESTART LOCATE @ " << _transport_frame << endl;
+ (*i)->non_realtime_locate (tf);
+ //::usleep (250000);
+ cerr << "\t\tcounter after track: " << g_atomic_int_get (&_seek_counter) << endl;
+ if (sc != g_atomic_int_get (&_seek_counter)) {
+ cerr << "\n\n RESTART locate, new seek delivered\n";
goto restart;
}
}
}
{
+ /* VCAs are quick to locate because they have no data (except
+ automation) associated with them. Don't bother with a
+ restart mechanism here, but do use the same transport frame
+ that the Routes used.
+ */
VCAList v = _vca_manager->vcas ();
for (VCAList::const_iterator i = v.begin(); i != v.end(); ++i) {
- (*i)->non_realtime_locate (_transport_frame);
+ (*i)->non_realtime_locate (tf);
}
}
pending_locate_frame = target_frame;
pending_locate_roll = with_roll;
pending_locate_flush = with_flush;
+ cerr << "Declick scheduled ... back soon\n";
return;
}
}
+ cerr << "... now doing the actual locate\n";
+
// Update Timecode time
_transport_frame = target_frame;
+ // Bump seek counter so that any in-process locate in the butler
+ // thread(s?) can restart.
+ g_atomic_int_inc (&_seek_counter);
_last_roll_or_reversal_location = target_frame;
timecode_time(_transport_frame, transmitting_timecode_time);