Mercurial > hg > vamp-plugin-sdk
comparison src/vamp-sdk/PluginAdapter.cpp @ 240:7b90fe049d04
* Add --list-full to "simple" Vamp host
author | cannam |
---|---|
date | Mon, 10 Nov 2008 16:47:41 +0000 |
parents | 7b12c3decc42 |
children | 6579e441f2fe |
comparison
equal
deleted
inserted
replaced
239:cc467e52da4c | 240:7b90fe049d04 |
---|---|
659 desc->description = strdup(od.description.c_str()); | 659 desc->description = strdup(od.description.c_str()); |
660 desc->unit = strdup(od.unit.c_str()); | 660 desc->unit = strdup(od.unit.c_str()); |
661 desc->hasFixedBinCount = od.hasFixedBinCount; | 661 desc->hasFixedBinCount = od.hasFixedBinCount; |
662 desc->binCount = od.binCount; | 662 desc->binCount = od.binCount; |
663 | 663 |
664 if (od.hasFixedBinCount && od.binCount > 0) { | 664 if (od.hasFixedBinCount && od.binCount > 0 |
665 // We would like to do "&& !od.binNames.empty()" here -- but we | |
666 // can't, because it will crash older versions of the host adapter | |
667 // which try to copy the names across whenever the bin count is | |
668 // non-zero, regardless of whether they exist or not | |
669 ) { | |
665 desc->binNames = (const char **) | 670 desc->binNames = (const char **) |
666 malloc(od.binCount * sizeof(const char *)); | 671 malloc(od.binCount * sizeof(const char *)); |
667 | 672 |
668 for (unsigned int i = 0; i < od.binCount; ++i) { | 673 for (unsigned int i = 0; i < od.binCount; ++i) { |
669 if (i < od.binNames.size()) { | 674 if (i < od.binNames.size()) { |