Port-Matrix: use cached nchannels
This surprisingly significantly speeds up rendering of large matrices. 20sec instead of 43sec for a 512x512 matrix on a i7-10610U
This commit is contained in:
@@ -84,7 +84,7 @@ BundleEditorMatrix::set_state (BundleChannel c[2], bool s)
|
||||
PortMatrixNode::State
|
||||
BundleEditorMatrix::get_state (BundleChannel c[2]) const
|
||||
{
|
||||
if (c[0].bundle->nchannels() == ChanCount::ZERO || c[1].bundle->nchannels() == ChanCount::ZERO) {
|
||||
if (c[0].nchannels() == ChanCount::ZERO || c[1].nchannels() == ChanCount::ZERO) {
|
||||
return PortMatrixNode::NOT_ASSOCIATED;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ GlobalPortMatrix::get_state (BundleChannel c[2]) const
|
||||
return PortMatrixNode::NOT_ASSOCIATED;
|
||||
}
|
||||
|
||||
if (c[0].bundle->nchannels() == ChanCount::ZERO || c[1].bundle->nchannels() == ChanCount::ZERO) {
|
||||
if (c[0].nchannels() == ChanCount::ZERO || c[1].nchannels() == ChanCount::ZERO) {
|
||||
return PortMatrixNode::NOT_ASSOCIATED;
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ IOSelector::set_state (ARDOUR::BundleChannel c[2], bool s)
|
||||
PortMatrixNode::State
|
||||
IOSelector::get_state (ARDOUR::BundleChannel c[2]) const
|
||||
{
|
||||
if (c[0].bundle->nchannels() == ChanCount::ZERO || c[1].bundle->nchannels() == ChanCount::ZERO) {
|
||||
if (c[0].nchannels() == ChanCount::ZERO || c[1].nchannels() == ChanCount::ZERO) {
|
||||
return PortMatrixNode::NOT_ASSOCIATED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user