better algorithm for checking when AU plugins ::can_do() a particular IO configuration (Ben Loftis)

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6574 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-01-27 15:40:23 +00:00
parent 98a415f220
commit dda0cda30b

View file

@ -801,6 +801,18 @@ AUPlugin::can_do (int32_t in, int32_t& out)
cerr << name() << " has " << io_configs.size() << " IO Configurations\n";
}
//first search for the simple case that matches what we need exactly
for (vector<pair<int,int> >::iterator i = io_configs.begin(); i != io_configs.end(); ++i) {
int32_t possible_in = i->first;
int32_t possible_out = i->second;
if (possible_in == in && possible_out== out) {
return 1;
}
}
/* now allow potentially "imprecise" matches */
for (vector<pair<int,int> >::iterator i = io_configs.begin(); i != io_configs.end(); ++i) {
int32_t possible_in = i->first;