better libardour infrastructure for virtual soundcheck
This commit is contained in:
parent
8b47aad657
commit
4a2bed08ec
|
@ -1411,6 +1411,7 @@ public:
|
|||
|
||||
void enable_virtual_soundcheck ();
|
||||
void disable_virtual_soundcheck ();
|
||||
bool virtual_soundcheck() const;
|
||||
PBD::Signal1<void,bool> VirtualSoundCheckChanged;
|
||||
|
||||
protected:
|
||||
|
@ -2426,6 +2427,7 @@ private:
|
|||
uint32_t _no_file_format_reset;
|
||||
|
||||
void set_virtual_soundcheck (bool);
|
||||
bool _virtual_soundcheck;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -2843,6 +2843,7 @@ Route::set_state (const XMLNode& node, int version)
|
|||
_volume_control.reset (new GainControl (_session, MainOutVolume));
|
||||
_volume_control->set_flag (Controllable::NotAutomatable);
|
||||
_main_outs->set_gain_control (_volume_control);
|
||||
_volume_control->set_value (_session.virtual_soundcheck() ? 1. : 0., PBD::Controllable::NoGroup);
|
||||
}
|
||||
|
||||
set_processor_state (processor_state, version);
|
||||
|
@ -3537,7 +3538,7 @@ Route::create_master_send ()
|
|||
{
|
||||
_master_send.reset (new InternalSend (_session, pannable(), _mute_master, std::dynamic_pointer_cast<Route> (shared_from_this()), _session.master_out(), Delivery::MasterSend, false));
|
||||
_master_send->set_display_to_user (false);
|
||||
_master_send->gain_control()->set_value (dB_to_coefficient (0.0), Controllable::NoGroup);
|
||||
_master_send->gain_control()->set_value (_session.virtual_soundcheck() ? 0. : 1., Controllable::NoGroup);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -349,6 +349,7 @@ Session::Session (AudioEngine &eng,
|
|||
, _active_cue (-1)
|
||||
, tb_with_filled_slots (0)
|
||||
, _no_file_format_reset (0)
|
||||
, _virtual_soundcheck (false)
|
||||
{
|
||||
_suspend_save.store (0);
|
||||
_playback_load.store (0);
|
||||
|
@ -8254,6 +8255,10 @@ Session::disable_virtual_soundcheck ()
|
|||
void
|
||||
Session::set_virtual_soundcheck (bool yn)
|
||||
{
|
||||
if (!Profile->get_livetrax()) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::shared_ptr<RouteList const> rl = routes.reader ();
|
||||
std::shared_ptr<AutomationControlList> master_sends (new AutomationControlList);
|
||||
std::shared_ptr<AutomationControlList> main_outs (new AutomationControlList);
|
||||
|
@ -8277,5 +8282,17 @@ Session::set_virtual_soundcheck (bool yn)
|
|||
set_controls (main_outs, main_val, PBD::Controllable::NoGroup);
|
||||
}
|
||||
|
||||
_virtual_soundcheck = yn;
|
||||
|
||||
VirtualSoundCheckChanged (yn); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
bool
|
||||
Session::virtual_soundcheck () const
|
||||
{
|
||||
if (!Profile->get_livetrax()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return _virtual_soundcheck;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue