reinstate "restart seek" behaviour but use a new Session::_seek_counter member variable for this
This commit is contained in:
parent
65756b9c00
commit
736ca2ffbb
|
@ -1241,6 +1241,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||||
int transport_sub_state;
|
int transport_sub_state;
|
||||||
mutable gint _record_status;
|
mutable gint _record_status;
|
||||||
framepos_t _transport_frame;
|
framepos_t _transport_frame;
|
||||||
|
gint _seek_counter;
|
||||||
Location* _session_range_location; ///< session range, or 0 if there is nothing in the session yet
|
Location* _session_range_location; ///< session range, or 0 if there is nothing in the session yet
|
||||||
bool _session_range_end_is_free;
|
bool _session_range_end_is_free;
|
||||||
Slave* _slave;
|
Slave* _slave;
|
||||||
|
|
|
@ -181,6 +181,7 @@ Session::Session (AudioEngine &eng,
|
||||||
, transport_sub_state (0)
|
, transport_sub_state (0)
|
||||||
, _record_status (Disabled)
|
, _record_status (Disabled)
|
||||||
, _transport_frame (0)
|
, _transport_frame (0)
|
||||||
|
, _seek_counter (0)
|
||||||
, _session_range_location (0)
|
, _session_range_location (0)
|
||||||
, _session_range_end_is_free (true)
|
, _session_range_end_is_free (true)
|
||||||
, _slave (0)
|
, _slave (0)
|
||||||
|
|
|
@ -584,23 +584,34 @@ Session::non_realtime_locate ()
|
||||||
|
|
||||||
|
|
||||||
microseconds_t begin = get_microseconds ();
|
microseconds_t begin = get_microseconds ();
|
||||||
|
framepos_t tf;
|
||||||
const framepos_t tf = _transport_frame;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
boost::shared_ptr<RouteList> rl = routes.reader();
|
boost::shared_ptr<RouteList> rl = routes.reader();
|
||||||
|
|
||||||
|
restart:
|
||||||
|
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 << "\n\n";
|
||||||
|
|
||||||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||||
(*i)->non_realtime_locate (tf);
|
(*i)->non_realtime_locate (tf);
|
||||||
|
if (sc != g_atomic_int_get (&_seek_counter)) {
|
||||||
|
cerr << "\n\n RESTART locate, new seek delivered\n";
|
||||||
|
goto restart;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cerr << "\n\n <<< DONE Non-RT locate on routes\n\n";
|
cerr << "\n\n <<< DONE Non-RT locate on routes\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
/* 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 ();
|
VCAList v = _vca_manager->vcas ();
|
||||||
for (VCAList::const_iterator i = v.begin(); i != v.end(); ++i) {
|
for (VCAList::const_iterator i = v.begin(); i != v.end(); ++i) {
|
||||||
(*i)->non_realtime_locate (tf);
|
(*i)->non_realtime_locate (tf);
|
||||||
|
@ -1241,6 +1252,9 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
|
||||||
|
|
||||||
// Update Timecode time
|
// Update Timecode time
|
||||||
_transport_frame = target_frame;
|
_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;
|
_last_roll_or_reversal_location = target_frame;
|
||||||
timecode_time(_transport_frame, transmitting_timecode_time);
|
timecode_time(_transport_frame, transmitting_timecode_time);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user