comparison runner/main.cpp @ 171:c1834a31029c

Merge from branch "jams"
author Chris Cannam
date Wed, 15 Oct 2014 16:09:47 +0100
parents 859d8ec60e06
children 11a9ce2fa331
comparison
equal deleted inserted replaced
163:f4f770b4356b 171:c1834a31029c
937 goodSources.push_back(source); 937 goodSources.push_back(source);
938 } 938 }
939 } 939 }
940 if (multiplex) { 940 if (multiplex) {
941 try { 941 try {
942 for (int i = 0; i < (int)writers.size(); ++i) {
943 writers[i]->setNofM(1, 1);
944 }
942 manager.extractFeaturesMultiplexed(goodSources); 945 manager.extractFeaturesMultiplexed(goodSources);
943 } catch (const std::exception &e) { 946 } catch (const std::exception &e) {
944 cerr << "ERROR: Feature extraction failed: " 947 cerr << "ERROR: Feature extraction failed: "
945 << e.what() << endl; 948 << e.what() << endl;
946 } 949 }
947 } else { 950 } else {
951 int n = 0;
948 for (QStringList::const_iterator i = goodSources.begin(); 952 for (QStringList::const_iterator i = goodSources.begin();
949 i != goodSources.end(); ++i) { 953 i != goodSources.end(); ++i) {
950 std::cerr << "Extracting features for: \"" << i->toStdString() 954 std::cerr << "Extracting features for: \"" << i->toStdString()
951 << "\"" << std::endl; 955 << "\"" << std::endl;
956 ++n;
952 try { 957 try {
958 for (int j = 0; j < (int)writers.size(); ++j) {
959 writers[j]->setNofM(n, goodSources.size());
960 }
953 manager.extractFeatures(*i); 961 manager.extractFeatures(*i);
954 } catch (const std::exception &e) { 962 } catch (const std::exception &e) {
955 cerr << "ERROR: Feature extraction failed for \"" 963 cerr << "ERROR: Feature extraction failed for \""
956 << i->toStdString() << "\": " << e.what() << endl; 964 << i->toStdString() << "\": " << e.what() << endl;
957 if (force) { 965 if (force) {