Mercurial > hg > vamp-plugin-sdk
comparison host/vamp-simple-host.cpp @ 248:c88a3cdb0215
* Tidy up --list-full output a bit
* Some documentation, including docs for PluginSummarisingAdapter
| author | cannam |
|---|---|
| date | Tue, 11 Nov 2008 12:07:09 +0000 |
| parents | 70e6826adc64 |
| children | 7d678f889789 |
comparison
equal
deleted
inserted
replaced
| 246:5bfed156b45d | 248:c88a3cdb0215 |
|---|---|
| 628 } | 628 } |
| 629 | 629 |
| 630 } else if (verbosity == PluginInformationDetailed) { | 630 } else if (verbosity == PluginInformationDetailed) { |
| 631 | 631 |
| 632 cout << header(plugin->getName(), 2); | 632 cout << header(plugin->getName(), 2); |
| 633 cout << "- Identifier: " | 633 cout << " - Identifier: " |
| 634 << key << endl; | 634 << key << endl; |
| 635 cout << "- Plugin Version: " | 635 cout << " - Plugin Version: " |
| 636 << plugin->getPluginVersion() << endl; | 636 << plugin->getPluginVersion() << endl; |
| 637 cout << "- Vamp API Version: " | 637 cout << " - Vamp API Version: " |
| 638 << plugin->getVampApiVersion() << endl; | 638 << plugin->getVampApiVersion() << endl; |
| 639 cout << "- Maker: \"" | 639 cout << " - Maker: \"" |
| 640 << plugin->getMaker() << "\"" << endl; | 640 << plugin->getMaker() << "\"" << endl; |
| 641 cout << "- Copyright: \"" | 641 cout << " - Copyright: \"" |
| 642 << plugin->getCopyright() << "\"" << endl; | 642 << plugin->getCopyright() << "\"" << endl; |
| 643 cout << "- Description: \"" | 643 cout << " - Description: \"" |
| 644 << plugin->getDescription() << "\"" << endl; | 644 << plugin->getDescription() << "\"" << endl; |
| 645 cout << "- Input Domain: " | 645 cout << " - Input Domain: " |
| 646 << (plugin->getInputDomain() == Vamp::Plugin::TimeDomain ? | 646 << (plugin->getInputDomain() == Vamp::Plugin::TimeDomain ? |
| 647 "Time Domain" : "Frequency Domain") << endl; | 647 "Time Domain" : "Frequency Domain") << endl; |
| 648 cout << "- Default Step Size: " | 648 cout << " - Default Step Size: " |
| 649 << plugin->getPreferredStepSize() << endl; | 649 << plugin->getPreferredStepSize() << endl; |
| 650 cout << "- Default Block Size: " | 650 cout << " - Default Block Size: " |
| 651 << plugin->getPreferredBlockSize() << endl; | 651 << plugin->getPreferredBlockSize() << endl; |
| 652 cout << "- Minimum Channels: " | 652 cout << " - Minimum Channels: " |
| 653 << plugin->getMinChannelCount() << endl; | 653 << plugin->getMinChannelCount() << endl; |
| 654 cout << "- Maximum Channels: " | 654 cout << " - Maximum Channels: " |
| 655 << plugin->getMaxChannelCount() << endl; | 655 << plugin->getMaxChannelCount() << endl; |
| 656 | 656 |
| 657 } else if (verbosity == PluginIds) { | 657 } else if (verbosity == PluginIds) { |
| 658 cout << "vamp:" << key << endl; | 658 cout << "vamp:" << key << endl; |
| 659 } | 659 } |
| 665 | 665 |
| 666 Plugin::ParameterList params = plugin->getParameterDescriptors(); | 666 Plugin::ParameterList params = plugin->getParameterDescriptors(); |
| 667 for (size_t j = 0; j < params.size(); ++j) { | 667 for (size_t j = 0; j < params.size(); ++j) { |
| 668 Plugin::ParameterDescriptor &pd(params[j]); | 668 Plugin::ParameterDescriptor &pd(params[j]); |
| 669 cout << "\nParameter " << j+1 << ": \"" << pd.name << "\"" << endl; | 669 cout << "\nParameter " << j+1 << ": \"" << pd.name << "\"" << endl; |
| 670 cout << "- Identifier: " << pd.identifier << endl; | 670 cout << " - Identifier: " << pd.identifier << endl; |
| 671 cout << "- Description: \"" << pd.description << "\"" << endl; | 671 cout << " - Description: \"" << pd.description << "\"" << endl; |
| 672 if (pd.unit != "") { | 672 if (pd.unit != "") { |
| 673 cout << "- Unit: " << pd.unit << endl; | 673 cout << " - Unit: " << pd.unit << endl; |
| 674 } | 674 } |
| 675 cout << "- Range: "; | 675 cout << " - Range: "; |
| 676 cout << pd.minValue << " -> " << pd.maxValue << endl; | 676 cout << pd.minValue << " -> " << pd.maxValue << endl; |
| 677 cout << "- Default: "; | 677 cout << " - Default: "; |
| 678 cout << pd.defaultValue << endl; | 678 cout << pd.defaultValue << endl; |
| 679 if (pd.isQuantized) { | 679 if (pd.isQuantized) { |
| 680 cout << "- Quantize Step: " | 680 cout << " - Quantize Step: " |
| 681 << pd.quantizeStep << endl; | 681 << pd.quantizeStep << endl; |
| 682 } | 682 } |
| 683 if (!pd.valueNames.empty()) { | 683 if (!pd.valueNames.empty()) { |
| 684 cout << "- Value Names: "; | 684 cout << " - Value Names: "; |
| 685 for (size_t k = 0; k < pd.valueNames.size(); ++k) { | 685 for (size_t k = 0; k < pd.valueNames.size(); ++k) { |
| 686 if (k > 0) cout << ", "; | 686 if (k > 0) cout << ", "; |
| 687 cout << "\"" << pd.valueNames[k] << "\""; | 687 cout << "\"" << pd.valueNames[k] << "\""; |
| 688 } | 688 } |
| 689 cout << endl; | 689 cout << endl; |
| 694 cout << "\n** Note: This plugin reports no outputs!" << endl; | 694 cout << "\n** Note: This plugin reports no outputs!" << endl; |
| 695 } | 695 } |
| 696 for (size_t j = 0; j < outputs.size(); ++j) { | 696 for (size_t j = 0; j < outputs.size(); ++j) { |
| 697 Plugin::OutputDescriptor &od(outputs[j]); | 697 Plugin::OutputDescriptor &od(outputs[j]); |
| 698 cout << "\nOutput " << j+1 << ": \"" << od.name << "\"" << endl; | 698 cout << "\nOutput " << j+1 << ": \"" << od.name << "\"" << endl; |
| 699 cout << "- Identifier: " << od.identifier << endl; | 699 cout << " - Identifier: " << od.identifier << endl; |
| 700 cout << "- Description: \"" << od.description << "\"" << endl; | 700 cout << " - Description: \"" << od.description << "\"" << endl; |
| 701 if (od.unit != "") { | 701 if (od.unit != "") { |
| 702 cout << "- Unit: " << od.unit << endl; | 702 cout << " - Unit: " << od.unit << endl; |
| 703 } | 703 } |
| 704 if (od.hasFixedBinCount) { | 704 if (od.hasFixedBinCount) { |
| 705 cout << "- Default Bin Count: " << od.binCount << endl; | 705 cout << " - Default Bin Count: " << od.binCount << endl; |
| 706 } | 706 } |
| 707 if (!od.binNames.empty()) { | 707 if (!od.binNames.empty()) { |
| 708 cout << "- Bin Names: "; | 708 bool have = false; |
| 709 for (size_t k = 0; k < od.binNames.size(); ++k) { | 709 for (size_t k = 0; k < od.binNames.size(); ++k) { |
| 710 if (k > 0) cout << ", "; | 710 if (od.binNames[k] != "") { |
| 711 cout << "\"" << od.binNames[k] << "\""; | 711 have = true; break; |
| 712 } | |
| 712 } | 713 } |
| 713 cout << endl; | 714 if (have) { |
| 715 cout << " - Bin Names: "; | |
| 716 for (size_t k = 0; k < od.binNames.size(); ++k) { | |
| 717 if (k > 0) cout << ", "; | |
| 718 cout << "\"" << od.binNames[k] << "\""; | |
| 719 } | |
| 720 cout << endl; | |
| 721 } | |
| 714 } | 722 } |
| 715 if (od.hasKnownExtents) { | 723 if (od.hasKnownExtents) { |
| 716 cout << "- Default Extents: "; | 724 cout << " - Default Extents: "; |
| 717 cout << od.minValue << " -> " << od.maxValue << endl; | 725 cout << od.minValue << " -> " << od.maxValue << endl; |
| 718 } | 726 } |
| 719 if (od.isQuantized) { | 727 if (od.isQuantized) { |
| 720 cout << "- Quantize Step: " | 728 cout << " - Quantize Step: " |
| 721 << od.quantizeStep << endl; | 729 << od.quantizeStep << endl; |
| 722 } | 730 } |
| 723 cout << "- Sample Type: " | 731 cout << " - Sample Type: " |
| 724 << (od.sampleType == | 732 << (od.sampleType == |
| 725 Plugin::OutputDescriptor::OneSamplePerStep ? | 733 Plugin::OutputDescriptor::OneSamplePerStep ? |
| 726 "One Sample Per Step" : | 734 "One Sample Per Step" : |
| 727 od.sampleType == | 735 od.sampleType == |
| 728 Plugin::OutputDescriptor::FixedSampleRate ? | 736 Plugin::OutputDescriptor::FixedSampleRate ? |
| 729 "Fixed Sample Rate" : | 737 "Fixed Sample Rate" : |
| 730 "Variable Sample Rate") << endl; | 738 "Variable Sample Rate") << endl; |
| 731 if (od.sampleType != | 739 if (od.sampleType != |
| 732 Plugin::OutputDescriptor::OneSamplePerStep) { | 740 Plugin::OutputDescriptor::OneSamplePerStep) { |
| 733 cout << "- Default Rate: " | 741 cout << " - Default Rate: " |
| 734 << od.sampleRate << endl; | 742 << od.sampleRate << endl; |
| 735 } | 743 } |
| 736 cout << "- Has Duration: " | 744 cout << " - Has Duration: " |
| 737 << (od.hasDuration ? "Yes" : "No") << endl; | 745 << (od.hasDuration ? "Yes" : "No") << endl; |
| 738 } | 746 } |
| 739 } | 747 } |
| 740 | 748 |
| 741 if (outputs.size() > 1 || verbosity == PluginOutputIds) { | 749 if (outputs.size() > 1 || verbosity == PluginOutputIds) { |
