mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
better libardour infrastructure for virtual soundcheck
This commit is contained in:
parent
8b47aad657
commit
4a2bed08ec
3 changed files with 21 additions and 1 deletions
|
|
@ -1411,6 +1411,7 @@ public:
|
||||||
|
|
||||||
void enable_virtual_soundcheck ();
|
void enable_virtual_soundcheck ();
|
||||||
void disable_virtual_soundcheck ();
|
void disable_virtual_soundcheck ();
|
||||||
|
bool virtual_soundcheck() const;
|
||||||
PBD::Signal1<void,bool> VirtualSoundCheckChanged;
|
PBD::Signal1<void,bool> VirtualSoundCheckChanged;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -2426,6 +2427,7 @@ private:
|
||||||
uint32_t _no_file_format_reset;
|
uint32_t _no_file_format_reset;
|
||||||
|
|
||||||
void set_virtual_soundcheck (bool);
|
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.reset (new GainControl (_session, MainOutVolume));
|
||||||
_volume_control->set_flag (Controllable::NotAutomatable);
|
_volume_control->set_flag (Controllable::NotAutomatable);
|
||||||
_main_outs->set_gain_control (_volume_control);
|
_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);
|
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.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->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
|
void
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,7 @@ Session::Session (AudioEngine &eng,
|
||||||
, _active_cue (-1)
|
, _active_cue (-1)
|
||||||
, tb_with_filled_slots (0)
|
, tb_with_filled_slots (0)
|
||||||
, _no_file_format_reset (0)
|
, _no_file_format_reset (0)
|
||||||
|
, _virtual_soundcheck (false)
|
||||||
{
|
{
|
||||||
_suspend_save.store (0);
|
_suspend_save.store (0);
|
||||||
_playback_load.store (0);
|
_playback_load.store (0);
|
||||||
|
|
@ -8254,6 +8255,10 @@ Session::disable_virtual_soundcheck ()
|
||||||
void
|
void
|
||||||
Session::set_virtual_soundcheck (bool yn)
|
Session::set_virtual_soundcheck (bool yn)
|
||||||
{
|
{
|
||||||
|
if (!Profile->get_livetrax()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<RouteList const> rl = routes.reader ();
|
std::shared_ptr<RouteList const> rl = routes.reader ();
|
||||||
std::shared_ptr<AutomationControlList> master_sends (new AutomationControlList);
|
std::shared_ptr<AutomationControlList> master_sends (new AutomationControlList);
|
||||||
std::shared_ptr<AutomationControlList> main_outs (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);
|
set_controls (main_outs, main_val, PBD::Controllable::NoGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_virtual_soundcheck = yn;
|
||||||
|
|
||||||
VirtualSoundCheckChanged (yn); /* EMIT SIGNAL */
|
VirtualSoundCheckChanged (yn); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Session::virtual_soundcheck () const
|
||||||
|
{
|
||||||
|
if (!Profile->get_livetrax()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _virtual_soundcheck;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue