13
0

another signal related to record state added from Tracks.

This doesn't appear to have obviously distinct semantics from RecordStateChanged
but Tracks is using it and I can't verify instantly that it could be replaced
by RecordStateChanged.
This commit is contained in:
Paul Davis 2015-05-08 16:26:52 -04:00
parent 43f4b82485
commit 9c95a8bdea
2 changed files with 14 additions and 8 deletions

View File

@ -299,7 +299,11 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
/* Record status signals */
PBD::Signal0<void> RecordStateChanged;
PBD::Signal0<void> RecordStateChanged; /* signals changes in recording state (i.e. are we recording) */
/* XXX may 2015: paul says: it isn't clear to me that this has semantics that cannot be inferrred
from the previous signal and session state.
*/
PBD::Signal0<void> RecordArmStateChanged; /* signals changes in recording arming */
/* Transport mechanism signals */

View File

@ -5093,19 +5093,21 @@ Session::update_route_record_state ()
RecordStateChanged (); /* EMIT SIGNAL */
}
i = rl->begin();
while (i != rl->end ()) {
for (i = rl->begin(); i != rl->end (); ++i) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (tr && !tr->record_enabled ()) {
break;
}
++i;
}
g_atomic_int_set (&_have_rec_disabled_track, i != rl->end () ? 1 : 0);
g_atomic_int_set (&_have_rec_disabled_track, i != rl->end () ? 1 : 0);
bool record_arm_state_changed = (old != g_atomic_int_get (&_have_rec_enabled_track) );
if (record_status() == Recording && record_arm_state_changed ) {
RecordArmStateChanged ();
}
}
void