_have_internal_generator = false;
_declickable = false;
_pending_declick = true;
+ _remote_control_id = 0;
_edit_group = 0;
_mix_group = 0;
}
}
+void
+Route::set_remote_control_id (uint32_t id)
+{
+ if (id != _remote_control_id) {
+ _remote_control_id = id;
+ RemoteControlIDChanged ();
+ }
+}
+
+uint32_t
+Route::remote_control_id() const
+{
+ return _remote_control_id;
+}
+
long
Route::order_key (string name) const
{
IO *co;
bool mute_audible;
bool solo_audible;
- bool no_monitor = (Config->get_use_hardware_monitoring() || Config->get_no_sw_monitoring ());
+ bool no_monitor = (Config->get_use_hardware_monitoring() || !Config->get_use_sw_monitoring ());
gain_t* gab = _session.gain_automation_buffer();
declick = _pending_declick;
-------------------------------------------------------------------------------------------------- */
if (with_redirects) {
- TentativeLockMonitor rm (redirect_lock, __LINE__, __FILE__);
+ TentativeRWLockMonitor rm (redirect_lock, false, __LINE__, __FILE__);
if (rm.locked()) {
if (mute_gain > 0 || !_mute_affects_pre_fader) {
for (i = _redirects.begin(); i != _redirects.end(); ++i) {
// AND software monitoring required
- !Config->get_no_sw_monitoring())) {
+ Config->get_use_sw_monitoring())) {
if (apply_gain_automation) {
}
}
- if (apply_gain_automation) {
+ if (apply_gain_automation && _session.transport_rolling()) {
_effective_gain = gab[nframes-1];
}
if (post_fader_work) {
- TentativeLockMonitor rm (redirect_lock, __LINE__, __FILE__);
+ TentativeRWLockMonitor rm (redirect_lock, false, __LINE__, __FILE__);
if (rm.locked()) {
if (mute_gain > 0 || !_mute_affects_post_fader) {
for (i = _redirects.begin(); i != _redirects.end(); ++i) {
}
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, true, __LINE__, __FILE__);
PluginInsert* pi;
PortInsert* porti;
}
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, true, __LINE__, __FILE__);
RedirectList::iterator existing_end = _redirects.end();
--existing_end;
}
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, true, __LINE__, __FILE__);
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
delete *i;
redirect_max_outs = 0;
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, true, __LINE__, __FILE__);
RedirectList::iterator i;
bool removed = false;
int
Route::reset_plugin_counts (uint32_t* lpc)
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, true, __LINE__, __FILE__);
return _reset_plugin_counts (lpc);
}
RedirectList to_be_deleted;
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, true, __LINE__, __FILE__);
RedirectList::iterator tmp;
RedirectList the_copy;
void
Route::all_redirects_flip ()
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, false, __LINE__, __FILE__);
if (_redirects.empty()) {
return;
void
Route::all_redirects_active (bool state)
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, false, __LINE__, __FILE__);
if (_redirects.empty()) {
return;
{
{
RedirectSorter comparator;
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, true, __LINE__, __FILE__);
uint32_t old_rmo = redirect_max_outs;
/* the sweet power of C++ ... */
}
{
- TentativeLockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ TentativeRWLockMonitor lm (redirect_lock, false, __LINE__, __FILE__);
if (lm.locked()) {
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
{
jack_nframes_t now = _session.transport_frame();
- if (!did_locate) {
- automation_snapshot (now);
- }
-
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, false, __LINE__, __FILE__);
+
+ if (!did_locate) {
+ automation_snapshot (now);
+ }
+
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
if (Config->get_plugins_stop_with_transport() && can_flush_redirects) {
}
apply_gain_automation = false;
-
+
if (n_inputs()) {
passthru (start_frame, end_frame, nframes, offset, 0, false);
} else {
Route::roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t offset, int declick,
bool can_record, bool rec_monitors_input)
{
- automation_snapshot (_session.transport_frame());
-
+ {
+ TentativeRWLockMonitor lm(redirect_lock, false, __LINE__, __FILE__);
+ if (lm.locked()) {
+ // automation snapshot can also be called from the non-rt context
+ // and it uses the redirect list, so we take the lock out here
+ automation_snapshot (_session.transport_frame());
+ }
+ }
+
if ((n_outputs() == 0 && _redirects.empty()) || n_inputs() == 0 || !_active) {
silence (nframes, offset);
return 0;
}
_silent = false;
+
apply_gain_automation = false;
{
TentativeLockMonitor am (automation_lock, __LINE__, __FILE__);
- if (am.locked()) {
+ if (am.locked() && _session.transport_rolling()) {
jack_nframes_t start_frame = end_frame - nframes;
if (_session.get_midi_feedback()) {
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, false, __LINE__, __FILE__);
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
(*i)->send_all_midi_feedback ();
}
buf = _midi_mute_control.write_feedback (buf, bufsize, _muted);
{
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, false, __LINE__, __FILE__);
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
buf = (*i)->write_midi_feedback (buf, bufsize);
}
this is called from the RT audio thread.
*/
- LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+ RWLockMonitor lm (redirect_lock, false, __LINE__, __FILE__);
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
(*i)->deactivate ();
if (get_control_info (ch, ev, additional)) {
data.controller_number = additional;
data.value = val;
-
+ last_written = value;
+
route._session.send_midi_message (get_port(), ev, ch, data);
}
}