Improve getting a Bundle total channel count
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Wed, 23 Aug 2017 18:40:11 +0000 (20:40 +0200)
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Wed, 23 Aug 2017 21:31:28 +0000 (23:31 +0200)
commit96a6529e2ef4a75a1232d42a13552599d7fb6e28
tree1ae167f65210e2b00eb53c08841209619ef03155
parentcc63df7e8d7e7f1ed255773398ff30c23205153c
Improve getting a Bundle total channel count

|Bundle::nchannels()| creates a ChanCount on demand, by iterating over
the |_channel| member variable. The sum of all |nchannels().n(t)| over
all non-NIL DataTypes |t| is thus equal to |_channel.size()|.

Consequently, calling |nchannels().n_total()| is a convoluted (and slow)
way of getting |_channel.size()|. Add a method |Bundle::n_total()| that
directly returns the latter.
libs/ardour/ardour/bundle.h
libs/ardour/bundle.cc