X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fbundle.cc;h=99340839d2bc080bdc6a6ce5acf8f04b82b303ea;hb=7eb2d1d16de5d52175485bdd1a6acc53019fdb22;hp=9d5640491f8aeee229ade4d6cb3678388ecd6d70;hpb=9ac6bb9befa047a6c349bed02d40da84600b67cc;p=ardour.git diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc index 9d5640491f..99340839d2 100644 --- a/libs/ardour/bundle.cc +++ b/libs/ardour/bundle.cc @@ -443,13 +443,15 @@ Bundle::connected_to (boost::shared_ptr 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(). +/** This must not be called in code executed as a response to a backend event, + * as it uses the backend port_get_all_connections(). * @return true if any of this bundle's channels are connected to anything. */ bool Bundle::connected_to_anything (AudioEngine& engine) { + PortManager& pm (engine); + for (uint32_t i = 0; i < nchannels().n_total(); ++i) { Bundle::PortList const & ports = channel_ports (i); @@ -459,7 +461,7 @@ Bundle::connected_to_anything (AudioEngine& engine) rather than doing it with Port. */ - if (engine.connected (ports[j])) { + if (pm.connected (ports[j])) { return true; } } @@ -566,7 +568,7 @@ Bundle::type_channel_to_overall (DataType t, uint32_t c) const if (t == DataType::NIL) { return c; } - + Glib::Threads::Mutex::Lock lm (_channel_mutex); vector::const_iterator i = _channel.begin (); @@ -589,7 +591,7 @@ Bundle::type_channel_to_overall (DataType t, uint32_t c) const ++o; } - /* NOTREACHED */ + abort(); /* NOTREACHED */ return -1; } @@ -600,11 +602,11 @@ Bundle::overall_channel_to_type (DataType t, uint32_t c) const if (t == DataType::NIL) { return c; } - + Glib::Threads::Mutex::Lock lm (_channel_mutex); uint32_t s = 0; - + vector::const_iterator i = _channel.begin (); for (uint32_t j = 0; j < c; ++j) { if (i->type == t) {