mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-16 02:16:09 +01:00
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:
parent
98a415f220
commit
dda0cda30b
1 changed files with 12 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue