comparison host/vamp-simple-host.cpp @ 32:13eae6cc6bac

* Add a function to look up the Vamp plugin path for the current platform. * Add make install stage and pkgconfig files. (This bit is rather Linux-specific.)
author cannam
date Mon, 31 Jul 2006 16:12:37 +0000
parents d97aafa99828
children ae3e47e76d2d
comparison
equal deleted inserted replaced
31:0e7aa8fabd76 32:13eae6cc6bac
47 47
48 using std::cout; 48 using std::cout;
49 using std::cerr; 49 using std::cerr;
50 using std::endl; 50 using std::endl;
51 using std::string; 51 using std::string;
52 using std::vector;
52 53
53 void printFeatures(int, int, int, Vamp::Plugin::FeatureSet); 54 void printFeatures(int, int, int, Vamp::Plugin::FeatureSet);
54 void transformInput(float *, size_t); 55 void transformInput(float *, size_t);
55 void fft(unsigned int, bool, double *, double *, double *, double *); 56 void fft(unsigned int, bool, double *, double *, double *, double *);
56 57
67 cerr << "Usage: " << argv[0] << " pluginlibrary.so[:plugin] [file.wav] [outputno]" << endl; 68 cerr << "Usage: " << argv[0] << " pluginlibrary.so[:plugin] [file.wav] [outputno]" << endl;
68 return 2; 69 return 2;
69 } 70 }
70 71
71 cerr << endl << argv[0] << ": Running..." << endl; 72 cerr << endl << argv[0] << ": Running..." << endl;
73
74 cerr << endl << "Vamp path is set to:" << endl;
75 vector<string> path = Vamp::PluginHostAdapter::getPluginPath();
76 for (size_t i = 0; i < path.size(); ++i) {
77 cerr << "\t" << path[i] << endl;
78 }
79 cerr << "(This program doesn't use the path; just printing it for information)" << endl << endl;
72 80
73 string soname = argv[1]; 81 string soname = argv[1];
74 string plugname = ""; 82 string plugname = "";
75 string wavname; 83 string wavname;
76 if (argc >= 3) wavname = argv[2]; 84 if (argc >= 3) wavname = argv[2];
113 cerr << argv[0] << ": Plugin " << (index+1) 121 cerr << argv[0] << ": Plugin " << (index+1)
114 << " is \"" << plugin.getName() << "\"" << endl; 122 << " is \"" << plugin.getName() << "\"" << endl;
115 123
116 if (plugin.getName() == plugname) plugnumber = index; 124 if (plugin.getName() == plugname) plugnumber = index;
117 125
118 cerr << "(testing overlap...)" << endl;
119 {
120 Vamp::PluginHostAdapter otherPlugin(descriptor, 48000);
121 cerr << "(other plugin reports min " << otherPlugin.getMinChannelCount() << " channels)" << endl;
122 }
123
124 ++index; 126 ++index;
125 } 127 }
126 128
127 cerr << argv[0] << ": Done\n" << endl; 129 cerr << argv[0] << ": Done\n" << endl;
128 130