mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 06:05:43 +01:00
Slightly hacky improvement to embolden the labels of
connection matrix tabs when they have connections. git-svn-id: svn://localhost/ardour2/branches/3.0@12371 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
451a03d68a
commit
fa1e12b682
4 changed files with 85 additions and 1 deletions
|
|
@ -99,6 +99,7 @@ class Bundle : public PBD::ScopedConnectionList
|
|||
void connect (boost::shared_ptr<Bundle>, AudioEngine &);
|
||||
void disconnect (boost::shared_ptr<Bundle>, AudioEngine &);
|
||||
bool connected_to (boost::shared_ptr<Bundle>, AudioEngine &);
|
||||
bool connected_to_anything (AudioEngine &);
|
||||
bool has_same_ports (boost::shared_ptr<Bundle>) const;
|
||||
uint32_t type_channel_to_overall (DataType, uint32_t) const;
|
||||
uint32_t overall_channel_to_type (DataType, uint32_t) const;
|
||||
|
|
|
|||
|
|
@ -440,6 +440,34 @@ Bundle::connected_to (boost::shared_ptr<Bundle> other, AudioEngine & engine)
|
|||
return true;
|
||||
}
|
||||
|
||||
/** This must not be called in code executed as a response to a JACK event,
|
||||
* as it uses jack_port_get_all_connections().
|
||||
* @return true if any of this bundle's channels are connected to anything.
|
||||
*/
|
||||
bool
|
||||
Bundle::connected_to_anything (AudioEngine& engine)
|
||||
{
|
||||
for (uint32_t i = 0; i < nchannels().n_total(); ++i) {
|
||||
Bundle::PortList const & ports = channel_ports (i);
|
||||
|
||||
for (uint32_t j = 0; j < ports.size(); ++j) {
|
||||
/* ports[j] may not be an Ardour port, so use JACK directly
|
||||
rather than doing it with Port.
|
||||
*/
|
||||
jack_port_t* jp = jack_port_by_name (engine.jack(), ports[j].c_str());
|
||||
if (jp) {
|
||||
const char ** c = jack_port_get_all_connections (engine.jack(), jp);
|
||||
if (c) {
|
||||
jack_free (c);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
Bundle::set_ports_are_inputs ()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue