Expose pan-link via Send API, emit signal on change

This commit is contained in:
Robin Gareus 2020-04-24 00:25:24 +02:00
parent 0719df9d21
commit 135814cf0d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 28 additions and 0 deletions

View File

@ -84,6 +84,10 @@ public:
void set_remove_on_disconnect (bool b) { _remove_on_disconnect = b; }
bool remove_on_disconnect () const { return _remove_on_disconnect; }
bool has_panner () const;
bool panner_linked_to_route () const;
void set_panner_linked_to_route (bool);
uint32_t pans_required() const { return _configured_input.n_audio(); }
void run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool);

View File

@ -433,6 +433,30 @@ Send::set_state_2X (const XMLNode& node, int /* version */)
return 0;
}
bool
Send::has_panner () const
{
/* see InternalSend::run() and Delivery::run */
if (_panshell && role () != Listen && _panshell->panner()) {
return true; // !_panshell->bypassed ()
}
return false;
}
bool
Send::panner_linked_to_route () const
{
return _panshell ? _panshell->is_linked_to_route() : false;
}
void
Send::set_panner_linked_to_route (bool onoff) {
if (_panshell) {
_panshell->set_linked_to_route (onoff);
PropertyChanged (PBD::PropertyChange ()); /* EMIT SIGNAL */
}
}
bool
Send::can_support_io_configuration (const ChanCount& in, ChanCount& out)
{