Move panner bypass state up to the PannerShell so that it is preserved even when...
[ardour2.git] / libs / ardour / auto_bundle.cc
blobbedb270dc54be602a4f46f56836ae4fbb97c20b8
1 #include <cassert>
2 #include "ardour/auto_bundle.h"
4 ARDOUR::AutoBundle::AutoBundle (bool i)
5 : Bundle (i)
10 ARDOUR::AutoBundle::AutoBundle (std::string const & n, bool i)
11 : Bundle (n, i)
16 ARDOUR::ChanCount
17 ARDOUR::AutoBundle::nchannels () const
19 Glib::Mutex::Lock lm (_ports_mutex);
20 return ChanCount (type(), _ports.size ());
23 const ARDOUR::PortList&
24 ARDOUR::AutoBundle::channel_ports (uint32_t c) const
26 assert (c < nchannels().get (type()));
28 Glib::Mutex::Lock lm (_ports_mutex);
29 return _ports[c];
32 void
33 ARDOUR::AutoBundle::set_channels (uint32_t n)
35 Glib::Mutex::Lock lm (_ports_mutex);
36 _ports.resize (n);
39 void
40 ARDOUR::AutoBundle::set_port (uint32_t c, std::string const & p)
42 assert (c < nchannels ().get (type()));
44 Glib::Mutex::Lock lm (_ports_mutex);
45 _ports[c].resize (1);
46 _ports[c][0] = p;