missing part of lincoln's patch
[ardour.git] / libs / ardour / auto_bundle.cc
index 9da32bbb7af2fd0ff854bd5d083002477dbe4b8c..bedb270dc54be602a4f46f56836ae4fbb97c20b8 100644 (file)
@@ -10,20 +10,20 @@ ARDOUR::AutoBundle::AutoBundle (bool i)
 ARDOUR::AutoBundle::AutoBundle (std::string const & n, bool i)
        : Bundle (n, i)
 {
-       
+
 }
 
-uint32_t
+ARDOUR::ChanCount
 ARDOUR::AutoBundle::nchannels () const
 {
        Glib::Mutex::Lock lm (_ports_mutex);
-       return _ports.size ();
+       return ChanCount (type(), _ports.size ());
 }
 
 const ARDOUR::PortList&
 ARDOUR::AutoBundle::channel_ports (uint32_t c) const
 {
-       assert (c < nchannels());
+       assert (c < nchannels().get (type()));
 
        Glib::Mutex::Lock lm (_ports_mutex);
        return _ports[c];
@@ -39,7 +39,7 @@ ARDOUR::AutoBundle::set_channels (uint32_t n)
 void
 ARDOUR::AutoBundle::set_port (uint32_t c, std::string const & p)
 {
-       assert (c < nchannels ());
+       assert (c < nchannels ().get (type()));
 
        Glib::Mutex::Lock lm (_ports_mutex);
        _ports[c].resize (1);