Mercurial > hg > svcore
comparison transform/TransformFactory.cpp @ 1139:205250c5d2a2
Handle unknown type
author | Chris Cannam |
---|---|
date | Tue, 03 Nov 2015 11:34:23 +0000 |
parents | 26cf6d5251ec |
children | ea636412f9fe 4607603c46d0 |
comparison
equal
deleted
inserted
replaced
1138:a2dbedc0cfee | 1139:205250c5d2a2 |
---|---|
792 | 792 |
793 Vamp::PluginBase *plugin = 0; | 793 Vamp::PluginBase *plugin = 0; |
794 | 794 |
795 if (t.getType() == Transform::FeatureExtraction) { | 795 if (t.getType() == Transform::FeatureExtraction) { |
796 | 796 |
797 // cerr << "TransformFactory::instantiateDefaultPluginFor: identifier \"" | |
798 // << identifier << "\" is a feature extraction transform" << endl; | |
799 | |
797 FeatureExtractionPluginFactory *factory = | 800 FeatureExtractionPluginFactory *factory = |
798 FeatureExtractionPluginFactory::instanceFor(pluginId); | 801 FeatureExtractionPluginFactory::instanceFor(pluginId); |
799 | 802 |
800 if (factory) { | 803 if (factory) { |
801 plugin = factory->instantiatePlugin(pluginId, rate); | 804 plugin = factory->instantiatePlugin(pluginId, rate); |
802 } | 805 } |
803 | 806 |
804 } else { | 807 } else if (t.getType() == Transform::RealTimeEffect) { |
808 | |
809 // cerr << "TransformFactory::instantiateDefaultPluginFor: identifier \"" | |
810 // << identifier << "\" is a real-time transform" << endl; | |
805 | 811 |
806 RealTimePluginFactory *factory = | 812 RealTimePluginFactory *factory = |
807 RealTimePluginFactory::instanceFor(pluginId); | 813 RealTimePluginFactory::instanceFor(pluginId); |
808 | 814 |
809 if (factory) { | 815 if (factory) { |
810 plugin = factory->instantiatePlugin(pluginId, 0, 0, rate, 1024, 1); | 816 plugin = factory->instantiatePlugin(pluginId, 0, 0, rate, 1024, 1); |
811 } | 817 } |
818 | |
819 } else { | |
820 cerr << "TransformFactory: ERROR: transform id \"" | |
821 << identifier << "\" is of unknown type" << endl; | |
812 } | 822 } |
813 | 823 |
814 return plugin; | 824 return plugin; |
815 } | 825 } |
816 | 826 |